Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_InteractInteraction

Public Function ExtractBLOBToHexEncodedString (
recs As DAO.Recordset,
FieldName As String,
Optional SuppressRemoveOLEHeader As Boolean = False
) As String

Returns BLOB information stored in the specified table and field as a hex encoded string.
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 ExtractBLOB() function.
This function automatically strips the OLE header appended by the bound OLE form controls, if present. See RemoveAccessOleHeader() for more information.

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

Optional SuppressRemoveOLEHeader as Boolean = False

(no description)

Call Template:

Dim s As String
s = xf.Interact.ExtractBLOBToHexEncodedString(recs, FieldName)
s = xf.Interact.ExtractBLOBToHexEncodedString(recs, FieldName, SuppressRemoveOLEHeader)

See Also:

Example 1:

Dim ID As Long
Dim recs As New ADODB.Recordset
Dim dbs as DAO.Database
Set dbs = CurrentDb()
ID= 23

recs.Open "SELECT * FROM xf_tblDocStore WHERE Doc_ID=" & ID, Application.CurrentProject.Connection
If recs.EOF() Then
MsgBox "BLOB record not found"
Else
recs.MoveFirst

xf.Interact.ExtractBLOB recs, "DocImage", Application.CurrentProject.path & "\Copy of Affirmative_Action.pdf"

recs.Close

Debug.Print "ExtractBLOB: Doc extracted to " & Application.CurrentProject.path & "\Copy of Affirmative_Action.pdf" & ": id=" & ID
End If
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd