Hello,
I used the below coding to store an image into the database.
lblImagePath.Text = ImageUpload.PostedFile.FileName
ImageUpload.PostedFile.SaveAs(lblImagePath.Text)
Dim mbytes() As Byte = System.IO.File.ReadAllBytes(lblImagePath.Text)
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\database\db.mdb;Persist Security Info=False")
Dim cmd As New OleDbCommand("insert into ImageTable values (@Image)", cn)
cmd.Parameters.Add("@Image", OleDbType.Binary, mbytes.Length).Value = mbytes
cn.Open()
cmd.ExecuteNonQuery()
Response.Write("Image load Success")
cn.Close()
Now how to load this image into an image box?