Wednesday, March 28, 2012

How to insert an image to sql db?

Hi there! how to insert an image to sql db using FileUpload Control? I saw a data type named "image", so it means to say you are able to insert an image and not the path, am I right? I spent a lot of time to do this but still, I don't know how to store the image to the db. Please post your example code if you want... I will appreciate all your suggestions or comments about this. Thanks!

Yes, you are on the right track, you want to get the file into a btye array then you can assign it to a sql image parameter. It works with any file not just images, it really means file image.

There is some stuff in this thread that may help

http://forums.asp.net/thread/1322372.aspx

Hope it helps,

Joe

|||http://forums.asp.net/thread/1405280.aspx

No comments:

Post a Comment