OLE Header Information (MS Access / SQL Server)

I have a C ++ application that should support the binary contents of a database (images, etc.). When using MS Access or MS SQL Server, this data is wrapped inside an OLE object. How to remove this OLE header information? Please note: I can’t just look for the beginning of a specific tag, as the content can be png, jpg and a whole bunch of other formats. Should I use something like COleDataObject?

+3
source share
3 answers

Using MS Access 2007 (I need to check other MS databases), the format is as follows:

84 bytes
file name + \0
full path + \0
5 bytes + [2] bytes (the third byte of those five bytes)
temp path + \0
4 bytes
actual data (if not using a link to the file)

, , - COleDataSource .

, ( 0x15 0x1c 0x32). ( 0x15 0x1c 0x2f) 78 , PowerPoint ( 0x15 0x1c 0x34) 95 .

+2

OleToDisk. , VBA. , , SQL Server.

+1

I rewrite my comment as an answer:

Do not use OLE fields, just use regular BLOBs.

+1
source

Source: https://habr.com/ru/post/1746387/


All Articles