Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_InteractInteraction

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

Writes BLOB information stored in the specified table and field to the specified disk file.
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.
Returns the number of bytes written to the Destination file.
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

Destination as String

The path and filename to write the binary information to.

Optional SuppressRemoveOLEHeader as Boolean = False

(no description)

Call Template:

Dim i As Long
i = xf.Interact.ExtractBLOB(recs, FieldName, Destination)
i = xf.Interact.ExtractBLOB(recs, FieldName, Destination, 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