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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

uploading images to database

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can somebody tell me how to upload images to database ; the way i try to do it is :

ImageInfo img = new ImageInfo picture.PostedFile.InputStream);
Stream imgStream = picture.PostedFile.InputStream;
int imgLen = picture.PostedFile.ContentLength;
byte[] imgBinaryData = new byte
;
int i = imgStream.Read(imgBinaryData,0,imgLen);

then i use an sql query to insert the image data into the table;
what's wrong here
Please does anybody know?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top