in reply to Using perl dbi and Sybase IQ doing insert with placeholder getting datatype error

You could try making the type explicit:
use DBI qw(SQL_VARCHAR); $sth->bind_param(1, $mrn, SQL_VARCHAR); $sth->execute();
Though it would be odd if it does work, because SQL_VARCHAR is supposed to be the default.
Update: The execute() docs say this:
If any arguments are given, then "execute" will effectively call "bind_param" for each value before executing the statement. Values bound in this way are usually treated as "SQL_VARCHAR" types unless the driver can determine the correct type (which is rare), or unless "bind_param" (or "bind_param_inout") has already been used to specify the type.
So that gives some credibility to explicitly declaring the type...maybe the driver is trying to be smart and interpreting your values as numbers, and while Sybase ASE might be able to handle that, perhaps Sybase IQ cannot.

Replies are listed 'Best First'.
Re^2: Using perl dbi and Sybase IQ doing insert with placeholder getting datatype error
by ckbbkc (Novice) on Sep 10, 2015 at 18:11 UTC

    Thank you very much! I tried your suggested solution. Unfortunately, explicitly declaring the type in the bind_param doesn't help.