Solved

Write OLE object containing bit map to BMP file using Visual Basic

Posted on 2008-06-19
3
344 Views
Last Modified: 2008-07-14
I have a database table with OLE objects holding BMP files.

Using DAO I can read the object into an Obejct variable and see the data as obj.value and the size as obj.FieldSize.

When I use "put" or "write" to dump the data to a file I get a different file size and I cannot view the picture.

Can you tell me what is the easiest way to write out the data to a BMP file?
0
Comment
Question by:valerieschupbach
  • 2
3 Comments
 

Accepted Solution

by:
valerieschupbach earned 0 total points
ID: 21836990
I found a solution myself at:

http://www.ammara.com/access_image_faq/read_write_blob.html

However my error was to load the bmp file through InsertObject rtaher than FileToBlob; as a result running BlobToFile will not reproduce the original image. So you have to use FileToBlob and BloToFile in conjunction for it to work well.
0
 

Author Comment

by:valerieschupbach
ID: 21836992
How can I close this question myself?
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question