I have this code in VB6 application - reading PDF file into a byte array:
So, at this time I have my PDF in aryByte variable.
Now I need to update an existing record in SQL table:
Body field is declared as varbinary(max)
Any trick in updating varbinary field?
Code:
Dim aryByte() As Byte
Open App.Path & "\ABC_XYZ.pdf" For Binary Access Read As #1
ReDim aryByte(0 To LOF(1) - 1)
Get #1, , aryByte
Close #1
Now I need to update an existing record in SQL table:
Rich (BB code):
UPDATE MyTable
Set Body = ??? aryByte ???
Where ID = 1234
Body field is declared as varbinary(max)
Any trick in updating varbinary field?