Re: Want binary data to show up as "Bitmap Image" with access/ado
From: Paul Clement (UseAdddressAtEndofMessage_at_swspectrum.com)
Date: 07/23/04
- Previous message: Burton G. Wilkins: "HOW TO: Avoide “Cannot create a child list for field …..”"
- In reply to: Microsoft: "Want binary data to show up as "Bitmap Image" with access/ado"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Jul 2004 11:49:32 -0500
On Wed, 21 Jul 2004 14:50:45 -0600, "Microsoft" <jimsjbox@yahoo.com> wrote:
Using VB/ADO I can get binary (Bitmap) data into a field of type "OLE
Object". But when I open the table, it field says "Long binary data" and
the form's Bound Object Frame doesn't display it as an image.
On the other hand, when I manually copy a BMP file and paste it into the
table, the text in the OLE Object says "Bitmap Image" and the form's Bound
Object Frame displays the bitmap.
I want my code to do the same as when I copy/paste a bitmap (not through
simulating a copy/paste operation).
This isn't possible. When an object is stored in an OLE field using the method you describe, OLE
header data is added through the native application that supports the object. You can't do this via
code without at least knowing what application to use to store this data in the OLE field. You would
also need to know what the OLE header information looked liked that was added by the native
application.
You would be much better off storing the data as Long Binary data, retrieving it and saving it to a
temporary file, and then loading it into an Image control (Access or VB) or PictureBox (VB).
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
- Previous message: Burton G. Wilkins: "HOW TO: Avoide “Cannot create a child list for field …..”"
- In reply to: Microsoft: "Want binary data to show up as "Bitmap Image" with access/ado"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|