By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,610 Members | 1,613 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,610 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
(BLOBs)
http://msdn.microsoft.com/library/de..._blob_data.asp

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
http://support.microsoft.com/default...b;en-us;317016

and

317043 How to read and write a file to and from a BLOB column by using
chunking in ADO.NET and Visual C# .NET http://support.microsoft.com/kb/317043

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#?

--
Father/Husband/Son/C++ Programmer

What else could a man want in the world?
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.