I have a table containing OLE fields and I would like to see the content of some fields as bytes. I only can view it in the Watch window with BinData array so far . I tried to convert it to a byte array using CByte function but it gives an "Type mismatch" error.
Is there any way to obtain the OLE field content as a byte array?
My code which reads byte by byte field content into Bindata array:
Sub DumpField()
Dim BinData(100) As Variant
Dim r As ADODB.Recordset
Dim i As Integer
Set r = New ADODB.Recordset
With r
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.Open "SELECT [fBinary] FROM tbDesc WHERE ID=100", CurrentProject.Connection
If .BOF Then MsgBox "No Records"
Exit Sub
End If
For i = 0 To r.Fields(0).ActualSize - 1
BinData(i) = r.Fields(0).GetChunk(1)
Next i
End With
End Sub