Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_InteractInteraction

Public Function StoreBLOBFromHexEncodedString (
HexString As String,
recs As DAO.Recordset,
FieldName As String
) As Long

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.

HexString as String

The hew formatted data to be stored

recs as DAO.Recordset

The ADO recordset (based on a table) to store the data in

FieldName as String

The name of the field to store the data in

Call Template:

Dim i As Long
i = xf.Interact.StoreBLOBFromHexEncodedString(HexString, recs, FieldName)

See Also:

Example 1:

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
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd