in reply to Using perl dbi and Sybase IQ doing insert with placeholder getting datatype error
Though it would be odd if it does work, because SQL_VARCHAR is supposed to be the default.use DBI qw(SQL_VARCHAR); $sth->bind_param(1, $mrn, SQL_VARCHAR); $sth->execute();
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.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.
|
|---|
| 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 |