I don't know what sample MDB on my site that Bri referred you to but perhaps
you are looking at the wrong one. Just read the data into a Byte array and
write it back out the same way with Get and Put. There are several examples
of this on my site and in my NG postings.
My code works as advertised. Your changing of the existing logic to use
String variables and then stating it does not work is your problem not mine.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark" <nospam@thanksanyway.org> wrote in message
news:c7udnbVqHsqudYzZRVn-pw@w-link.net...[color=blue]
> "Mark" <nospam@thanksanyway.org> wrote:[color=green]
>> Hello.
>>
>> I am attempting to write binary data from a file to an
>> OLE Object field, and then write the file back out from
>> the database.[/color]
>
> Ok, I checked out the Stephen Lebans examples that
> Bri referred me to. It turns out that the code I am using
> is clearly based on the ReadBlob() and WriteBlob()
> code that he uses from Microsoft's KB article
> Q103257 (this code has been modified and re-posted
> without credit on dozens of other sites.) I tried using
> this sample code verbatim, and it works just like my
> code did when using a string variable with GetChunk
> and AppendChunk.*
>
> So I guess my question is: is there any way to use
> VBA to write binary data to an OLE Object field
> without using a BSTR and suffering the storage
> penalty of saving the binary data as double-byte
> characters?
>
> Thanks again
> -Mark
>
>
>
> * The only difference is that the code in Q103257
> doesn't have to lie about the input file size. I'm not
> sure why, but I'll figure it out.
>
>
>
>[/color]