vba - Linked table OLE Object shows as null in a recordset while it is displayed on query view as OLE Object -
i have following oracle table connected access via odbc
id (int) file_type (varchar(20)) blob_data (blob)
the blob_data field holds excel files , want download them.
in access query view, field shown ole object
i have written following code till -
dim db database dim rst recordset set db = currentdb set rst = db.openrecordset("select blob_data my_table;") dim fld variant fld = rst.fields(0).value
when inspect fld field, shows null though access query view shows ole object. have odbc , linked tables? or missing something?
you can't set variants equal value of ole or blob fields, since can contain large objects. need use .getchunck
on field return chuncks of data of file, don't have load entire blob variable.
working .getchunck
enables have small part of file in memory when writing entire file disk.
the code required not small, following microsoft article describes well: https://support.microsoft.com/en-us/help/210486/acc2000-reading--storing--and-writing-binary-large-objects-blobs (yes, access 2000, couldn't find more up-to-date source microsoft).
if have remaining questions, feel free ask them in comments.
Comments
Post a Comment