954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Insert an Image in SQL

Guys

I have a table with image datatype and I wana insert an image in the image field, for example

insert into dbo.Products(ProductID, ProductName, ProductPrice, ProductImage)
valeus(144, '8 Gig Lenovo memory Stick', 250.00, 'Image from C:Drive or where ever the image residing')


Thanx in advance

Traicey
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 26
Solved Threads: 19
 

What programming language you're using? If VB.NEt, you may try Daniweb's site search. I've answered the same or at least very similar question few times. A pretty good search phrase is "image SQL Server VB.NET" (without quotes).

Teme64
Veteran Poster
1,031 posts since Aug 2008
Reputation Points: 218
Solved Threads: 203
 

Im not using VB.Net or any other language but SQL Server 2000, I need to write an insert statement im quiry builder in SQL which will be inserting an image and other records in my table, Im sure there is a way to do that, I just dont wana write a code in C# neither in VB to do that, I Wana insert in straight to SQL then I can retrieve it later from SQL using C#

Traicey
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 26
Solved Threads: 19
 

AFAIK with SQL Server 2000 you need to use textcopy utility. Check this MS forum's thread if it helps:
using textcopy to import image file (jpg) to sql server DB in SQL Server Programming

Teme64
Veteran Poster
1,031 posts since Aug 2008
Reputation Points: 218
Solved Threads: 203
 

Oh thanx that was very helpful

Traicey
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 26
Solved Threads: 19
 

how to insert image in sql ?!!!!
the link is not work
tnx

yassooo
Newbie Poster
1 post since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You