The PictureData prop of the CommandButton or Image control is of type
CF_DIB or CF_ENHMETAFILE or CF_METAFILEPICT.
I take it you are simply trying to not to have to write the contents of
the SQL field to a temp disk file and then load it into the Picture prop
of the desired control. If you are familiar with the GDI then create a
DIBSection and either play the Bitmap onto the DIB or use one of the
API's to get the Bits of the Bitmap. There is code on my site showing
how to take the contents of a DibSection and convert it to a CF_DIB
format that can be written directly to the PictureData property. Have a
look here:
http://www.lebans.com/imageclass.htm
Finally, you may get lucky and find the format of the Bitmap file stored
in the SQL field is that of a packed Bitmap and can simply add the
required CF_xxx header and then read/write the contents of your field
directly to the PictureData prop.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"J Askey" <je**@handelit.com> wrote in message
news:4d**************************@posting.google.c om...
Is this object available in Access? If so, what do I need to set a
reference to?
My bigger picture is needing a way to take a .bmp out of a SQL
database and put into both an CommandBarButton image and an
Access.Image. I have found lots of peices to get the .bmp into a byte
array, then the byte array into a StdPicture and then a StdPicture
into an iPicture but Im needing the IPersistStream object to do this.
Any other suggestions welcome too. ;-)
thank you...
j.a.