Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I insert a jpg into a MS SQL 7 database ?

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
GB
Can anybody help me with this ?
 
Where's your problem ? Creating a table that will hold a jpeg (use a varbinary field) ? or actually putting the data in? If it's the latter, what programming language are you using ?
 
Hello moonshadow,
my problem is actually inserting the file into the database.
I have a table with PhotoID ( int ), and Photo ( Image ).
I want to insert the file into the table using asp.
 
I have found a solution for this on the microsoft site. Check out the following link:

http:\\support.microsoft.com\default.aspx?scid=kb;EN-US;q258038

This details a way to save the image to a SQL Server database and a way to save the image file out of the same database. I'm working on a similar solution and have it working using ADO thru VB (using RS.AddNew...RS.Update). If anyone out there knows the INSERT SQL syntax to add the image to a SQL Server IMAGE DataType field, your help would be greatly appreciated.
 
This is for Visual Basic. I have tried it ,but cannot get it working with asp.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top