I am using following code to save my data to database
Where does the statement to save a picture in the database fit?
Dim drNewRowMCQsAns As DataRow
drNewRowMCQsAns = DsResultSaveNow.tblResult.NewRow
drNewRowMCQsAns.Item("PaperID") = vrPaperIDInitialized
drNewRowMCQsAns.Item("StudentID") = vrStudentID
drNewRowMCQsAns.Item("StudentName") = vrStudentName
DsResultSaveNow.tblResult.Rows.Add(drNewRowMCQsAns)
taResultSaveNow.Update(DsResultSaveNow.tblResult)
I have image field in the database but how to save an image?
Thanks
Well, the image data is simply a byte array
Load your image into the byte array from where ever you are getting it from and set it just like the other properties
Loading image into array:
From file:
From bitmap: