Antipoducus has asked for the wisdom of the Perl Monks concerning the following question:

A program that I need to work with stores geographical area definitions in MS Access DBs as arrays of 32-bit values in an "OLE Object" column. When I extract one of these blobs using SELECT and then unpack it I get the numbers that I am expecting. However, when I pack a set of longs into a string and then write it to the DB using select I get rubbish. For some reason it writes twice as many bytes to the DB filed as were in the string and the value of the data is rubbish. It appears that some conversion happens with an INSERT that doesn't happen when doing a select. I'd be grateful if anyone could point me towards an explanation. Thanks.

Edit by BazB: mark off-topic (OT).

  • Comment on OT: Is it possible to insert binary dat into MS Access DB?

Replies are listed 'Best First'.
Re: OT: Is it possible to insert binary dat into MS Access DB?
by maa (Pilgrim) on Dec 20, 2004 at 12:04 UTC

    For this type of data Access Recordsets provide a GetChunk/AppendChunk method so you might find you need to use either the recordset interface rather than ODBC.

    If your problem happens when overwriting data you may find it works if you blank the field first as the AppendChunk (which is probably being called by the Jet Engine) does an append... try updating it to Null first.

Re: OT: Is it possible to insert binary dat into MS Access DB?
by sasikumar (Monk) on Dec 20, 2004 at 10:39 UTC
    Hi

    Can u please so us a bit of code and the example data. That
    would help us lot in solving problems

    Thanks
    Sasi kumar