Question Programmatically accessing OLE attachments (1 Viewer)

mzafkismugi

New member
Local time
Today, 08:48
Joined
Jun 4, 2019
Messages
4
I have a huge database with a lot of OLE attachments which I'm trying to extract. The backing table has only two columns: `id` and `buf` (which has type `image`) which contains the actual attachment. There are no other columns. Can I somehow mass extract those attachments to files and keep the filename and extension?

The database holding the data is backed by SQL Server 2010.
 
Last edited:

mzafkismugi

New member
Local time
Today, 08:48
Joined
Jun 4, 2019
Messages
4
Since both approaches didn't work for me I decided to dig in but I'm stuck. What I know so far:

  1. MS Access 2000 as a frontend
  2. The attachments were created using "Create from File" dialog
  3. SQL Server 2010 is the backing database.
  4. The table is called contact_items_buf
  5. There are two columns: nr and buf. The actual file seems to be in the buf column.
  6. Type of column buf is image
  7. It appears the original filenames are not preserved
  8. The value stored in the column is not the file itself, I tried saving that as a binary file with the correct extension, but Word was not able to open it.
Is there any hope for me or I'll have to do it manually?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:48
Joined
Oct 29, 2018
Messages
21,457
Since both approaches didn't work for me I decided to dig in but I'm stuck. What I know so far:

  1. MS Access 2000 as a frontend
  2. The attachments were created using "Create from File" dialog
  3. SQL Server 2010 is the backing database.
  4. The table is called contact_items_buf
  5. There are two columns: nr and buf. The actual file seems to be in the buf column.
  6. Type of column buf is image
  7. It appears the original filenames are not preserved
  8. The value stored in the column is not the file itself, I tried saving that as a binary file with the correct extension, but Word was not able to open it.
Is there any hope for me or I'll have to do it manually?
How would you do it manually?
 

Users who are viewing this thread

Top Bottom