Reads a BLOB from a hexadecimal encoded binary data in a string and stores the contents in the specified table and OLE-type field.
The specified table with the OLE object field to contain the binary data must be open and the correct record navigated to prior to calling the ReadBLOB() function.
Returns the number of bytes read from the Source file.
The hew formatted data to be stored
The ADO recordset (based on a table) to store the data in
The name of the field to store the data in
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Dim ID As Long Dim recs As New ADODB.Recordset Dim dbs as DAO.Database Set dbs = CurrentDb() recs.Open "SELECT * FROM xf_tblDocStore" , Application.CurrentProject.Connection, adOpenDynamic, adLockOptimistic, adCmdText recs.AddNew recs!DocOrigName = "Affirmative_Action.pdf" xf.Interact.StoreBLOB Application.CurrentProject.path & "\Affirmative_Action.pdf" , recs, "DocImage" recs.Update ID = recs!Doc_ID recs.Close Set recs = Nothing Debug.Print "StoreBLOB: Doc copied to table: id=" & ID |