--- Begin Message ---
On 28/01/16 15:08, Jerrad Pierce wrote:
Hello Martin,

$DBI::VERSION = 1.634
$DBD::ODBC::VERSION = 1.52

It would also be useful to know the column type in your access DB.
I'm updating a LONGBINARY column in a Jet 4 (MDB) database.
Thanks
Thank you


I forgot, MS Access does not support the ODBC API SQLDescribeParam which a) it 
should and b) is a PITA when a driver does not. Because DBD::ODBC does not know 
the column type it binds it as a VARCHAR. Access will convert that varchar to a 
binary using whatever conversion algorithm it uses - obviously not one that 
works for you.

I think you will have to resort to specifying the bind type when you call 
bind_param. If you are not calling bind_param right now you'll have to start 
calling it and specify as the type SQL_BINARY.

As bind_param types are sticky you can probably call bind_param like so:

$st->bind_param(1, undef, {TYPE => SQL_BINARY});

and still continue to call execute as before:

$st->execute($parameter_1_value);

or you can just call bind_param with the real value and execute with no values.

Let me know if you need an example or if this does not sort it out for you.

I'm afraid the MS Access ODBC driver is a poor example of ODBC.

http://search.cpan.org/~mjevans/DBD-ODBC-1.52/FAQ#Why_am_I_getting_errors_with_bound_parameters?
 might provide some background.

Martin


--- End Message ---

Reply via email to