Why is my image not inserted? Here is my code.
Sub SaveToDBs(strImagePath As String, fname As String)
rs.Close
rs.Open "Sheet1", conn, adOpenDynamic, adLockBatchOptimistic, adCmdTable
Dim bytBLOB() As Byte
MsgBox strImagePath
Dim intNum As Integer
With rs
intNum = FreeFile
Open strImagePath For Binary As #intNum
ReDim bytBLOB(FileLen(strImagePath))
'Read data and close file
Get #intNum, , bytBLOB
Close #1
.Fields(fname).AppendChunk bytBLOB
.Update
End With
MsgBox "done"
End Sub
I got a "done" msgbox, but the image is not inserted !!!!
Anand source
share