Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading a Blob field in MS-Access 1

Status
Not open for further replies.

DevonTaig

Programmer
May 2, 2001
73
0
0
US
I have a field in an Access Database defined as OLE Object. It contains bitmaps (not links to bitmap files, but the actual bitmaps themselves). A second field stores power-point presentations and a third field stores .avi movies. I would like to create a VB application that can read the table and present the info in the appropriate container...I suppose a a picture box for bitmaps and an OLE container for power-point / .avi movies.

I have been able to use the ADODC control to bind simple data types to things like text boxes, but it doesn't seem to work for OLE Objects. Any ideas or sample code would be appreciated.
 
I think with BLOBs you need to use the GetChunk method of the ADO recordset object and write the data to a temp file first. Then load it in the appropriate container.
Greetings,
Rick
 
Look at my example in thread709-391834 [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 

You might want to use DAO3.6 instead of ADO for the PowerPoint OLE data.

Then you can use the VB OLE container object and let PowerPoint open the data in a window in VB (PowerPoint needs to be on the client machine) [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Hello

I still have some problems with my pictures in VB. When I try to show (or even read them), I always get: Invalid Picture.

I have SQL Server 2K. When I export my table to an Access File, make a form and I'm able to show the picture.

When I try that in my VB application, save the image to my HD disk, I always get the Error: Invalid Picture.

I followed the solutions from above, also the solution on the Microsoft site (Q258038). But no results.

My pictures are Bitmaps.

What could be the problem?


karel.denaeghel@barco.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top