store image to sql server

10 pts.
Tags:
SQL Server 2000
SQL Server Image Store
VB 6.0
Visual Basic
Visual Basic 6.0
would you please give me a code to store and retrieve an image in SQL Server 2000, using Visual Basic 6.0 on the front end

Software/Hardware used:
vb6
ASKED: October 19, 2009  8:28 AM
UPDATED: October 23, 2013  6:21 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gent01
    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.
    1,870 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following