Retrieving VBA-DAO inserted Blob Data in Access via ADO.Net-C#



I have a situation where I am utilizing code from MSDN to insert XLS files
into a Microsoft Access Table in a column of Ole Object using VBA and DAO.
That code also provides me with a method to extract the XLS files later.
This works wonderfully.

The Article is 103257, ACC: Reading, Storing, & Writing Binary Large Objects

I next transfer that data to a Dataset and then to SQL Server. I found the
following articles on MSDN which show how to insert and extract BLOB data
using Visual C#.

The Articles are

317016 How to read and write a file to or from a BLOB column by using
ADO.NET and Visual C# .NET;en-us;317016


317043 How to read and write a file to and from a BLOB column by using
chunking in ADO.NET and Visual C# .NET

These work on extracting XLS files which were previously inserted using C#
but fail to extract readable copies from the XLS files previously inserted
via VBA.

Things I have noticed.

1. The OLE Object size in Access is twice the size of the original file.
2. When the OLE Object is extracted using VBA-DAO, the file size is back to
that of the original file.
2. The OLE Object size in Access is equal to the BLOB size in SQL Server.
3. When the BLOB is extracted via C# from SQL Server, the extracted file
size matches the BLOB size exactly.

Please Help!

Does VBA-DAO and OLE Objects included some sort of encoding on insertion
which I must replicate C#?

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question