R
Richard Gration
Hi All,
I'm trying to issue SQL queries, which contain placeholders, from a
Gentoo Linux desktop to a Redhat Linux 7.1 server running Sybase ASE
11.0.3, using freetds (and unixODBC) and DBI. It all works well with a
variety of CLI clients: sqsh, tsql (freetds) and isql (unixODBC). The
problem comes when using DBI and placeholders.
freetds does not support placeholders at all, in any TDS version it
implements, so that kiboshes DBD::Sybase. They suggest using their ODBC
lib and DBD::ODBC. Everything is OK until trying to use a placeholder for
a numeric argument. Then the dreaded
========
Implicit conversion from datatype 'VARCHAR' to 'NUMERIC' is not allowed.
Use the CONVERT function to run this query.
========
error message appears. I've tried all sorts of things to get round this
but nothing works for me. I know that there is a little(!) magic inside
perl for allowing scalar values to be both strings and numbers as needed
and I wonder if this is the issue here.
Please, please, please does anybody know how I can solve this problem? I
have googled and peered into source code and nothing I've tried works.
Thanks for reading
Rich
I'm trying to issue SQL queries, which contain placeholders, from a
Gentoo Linux desktop to a Redhat Linux 7.1 server running Sybase ASE
11.0.3, using freetds (and unixODBC) and DBI. It all works well with a
variety of CLI clients: sqsh, tsql (freetds) and isql (unixODBC). The
problem comes when using DBI and placeholders.
freetds does not support placeholders at all, in any TDS version it
implements, so that kiboshes DBD::Sybase. They suggest using their ODBC
lib and DBD::ODBC. Everything is OK until trying to use a placeholder for
a numeric argument. Then the dreaded
========
Implicit conversion from datatype 'VARCHAR' to 'NUMERIC' is not allowed.
Use the CONVERT function to run this query.
========
error message appears. I've tried all sorts of things to get round this
but nothing works for me. I know that there is a little(!) magic inside
perl for allowing scalar values to be both strings and numbers as needed
and I wonder if this is the issue here.
Please, please, please does anybody know how I can solve this problem? I
have googled and peered into source code and nothing I've tried works.
Thanks for reading
Rich