Re: Want binary data to show up as "Bitmap Image" with access/ado

From: Paul Clement (UseAdddressAtEndofMessage_at_swspectrum.com)
Date: 07/23/04

  • Next message: Longs: "Having a problems with ADO recordset cursors"
    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)


  • Next message: Longs: "Having a problems with ADO recordset cursors"

    Relevant Pages

    • Re: HELP - OLE bitmap issue
      ... You need to return the file associations for the Bitmap image format to MS ... .jpg pictures are allowed to store as OLE objects? ... An Image inserted as an OLE object is no longer the same size as the ... clicking allows you to edit in MS Paint within the OLE field itself. ...
      (microsoft.public.access.forms)
    • Re: HELP - OLE bitmap issue
      ... ' OLECtrl refers to the OLE control on the form ... When you double click on a Bitmap file in the Explorer window what ... in the OLE field for the problem records containing the Bitmaps? ... it opens MS Paint as a seperate program rather than being able to edit ...
      (microsoft.public.access.forms)
    • Re: HELP - OLE bitmap issue
      ... Then MS Paint is not the application functioning as the OLE server to insert ... When you double click on a Bitmap file in the Explorer window what ... in the OLE field for the problem records containing the Bitmaps? ...
      (microsoft.public.access.forms)
    • Re: HELP - OLE bitmap issue
      ... The pertinent registry entries are still screwed up. ... ' OLECtrl refers to the OLE control on the form ... When you double click on a Bitmap file in the Explorer window what ... in the OLE field for the problem records containing the Bitmaps? ...
      (microsoft.public.access.forms)
    • Re: HELP - OLE bitmap issue
      ... entries are "Bitmap Image". ... in the OLE field for the problem records containing the Bitmaps? ... An Image inserted as an OLE object is no longer the same size as the ...
      (microsoft.public.access.forms)

    Loading