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!

Image Display

Status
Not open for further replies.

180689

Programmer
Jan 12, 2011
2

Gooday Coders
after saving a pic in a sql2005 database using this line of code in vb Iam using the fileupload control
how can I then display the picture? the image column in the database is of varbinary type
should I even be saving the pics in a database anyway?
help needed here asap if anyone can assist I would be very gratefull , thanx in advance.
this is how Iam saving into the dbase
Dim filedata As Byte() = New Byte(FileUpload1.PostedFile.ContentLength - 1) {}
Dim uploadedPostedFile As HttpPostedFile = FileUpload1.PostedFile()
uploadedPostedFile.InputStream.Read(filedata, 0, CInt(FileUpload1.PostedFile.ContentLength))
myCommand.Parameters.AddWithValue("@PropPic", filedata)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top