Monday, March 12, 2012

Save bmp to image field

I'm trying to determine how to save a bmp into my image field. I see the
bulk copy instructions, but that is only good if you know the size of the
bmp and write it into the format file. I need to save directly into the
field from a vb6 app. Any thoughts?
ThanksI'm assuming that you are using ADO. You should use a parameterized insert
and add an adLongVarBinary parameter to your parameter collection. Then use
the AppendChunk method on the parameter to write the BMP data to the
parameter. Finally calling Execute to send the statement to the server.
I don't use ADO that often, so those instructions might need a little
revising.
Brannon Jones
Developer - MDAC
This posting is provided "as is" with no warranties and confers no rights.
"ddg1950" <dgoncher@.clearlam.com> wrote in message
news:ujaxwwK8DHA.3348@.TK2MSFTNGP09.phx.gbl...
> I'm trying to determine how to save a bmp into my image field. I see the
> bulk copy instructions, but that is only good if you know the size of the
> bmp and write it into the format file. I need to save directly into the
> field from a vb6 app. Any thoughts?
> Thanks
>

No comments:

Post a Comment