
Storing binary file data in a Jet memo field
In case anyone's interested in this topic, the GetChunk and AppendChunk
methods weren't quite what I was looking for as I needed to do file i/o to
get the contents of the bmp file to begin with. I continued digging and
found a code example for exactly what I was looking for in the MSDN.
The keys are in using a redim'd byte array, the lof() function, and the get
and put statements on files opened in binary mode. Do a search in the MSDN
on the Get statement and you'll find the example, or e-mail me if you're
interested.
Chuck
Quote:
> Does anyone know how to store binary data (specifically, a bmp file) in
a
> Jet 4.0 memo field using VB?
>
> I was thinking that I could open the file in binary mode, build a string
> byte-by-byte, and assign the .value property of the field the contents
of
> the string. But perhaps there is an API function that does the same
thing.
>
> See the following:
> HOWTO: Read and Write BLOBs Using GetChunk and AppendChunk
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q194975&
> HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream
Object
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;q258038&
> Microsoft MVP (Visual Basic)