If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
I don’t have VB6 anymore to work out the code for you, so I’m not going to post this as the answer. Here is what you do:
Convert the image to a byte array. Add it as a parameter to the command object. Set the command object’s command test to INSERT INTO table(yourbinaryfield) VALUES(@nameyougavethebytearrayparameter)
To get it back out select and cast it to a byte array and convert it back to an image.
If you can’t figure out how to get the byte array into the command object parameters, covert it to a base64 string and store in in the database as string data.
I don’t have VB6 anymore to work out the code for you, so I’m not going to post this as the answer. Here is what you do:
Convert the image to a byte array. Add it as a parameter to the command object. Set the command object’s command test to INSERT INTO table(yourbinaryfield) VALUES(@nameyougavethebytearrayparameter)
To get it back out select and cast it to a byte array and convert it back to an image.
If you can’t figure out how to get the byte array into the command object parameters, covert it to a base64 string and store in in the database as string data.