Storing binary file data in a Jet memo field 
Author Message
 Storing binary file data in a Jet memo field

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://www.*-*-*.com/ ;EN-US;Q194975&

HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream Object
http://www.*-*-*.com/ ;EN-US;q258038&


Microsoft MVP (Visual Basic)



Tue, 22 Mar 2005 03:33:26 GMT  
 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)



Sun, 27 Mar 2005 10:00:24 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SQL Searching For Text in Memo Fields with Binary Data Included

2. Binary data into Memo field

3. Cannot store more than 64K of data in a binary field

4. Storing Binary Files in a Database Field ?

5. Write ADO Field containing binary data (files) to the file system

6. Store binary file in SQL Server Database field?

7. Stored procedure + memo datatype + jet engine

8. Append memo field to a different memo field

9. Memo fields - problems reporting 2 memo fields

10. Problem with Memo field in Jet 2.5 Parameter Query

11. Importing Text into Jet memo field--please help

12. JET: 4 Memo Fields in 1 Table?

 

 
Powered by phpBB® Forum Software