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)