Subject: | Issue with bound parameters in DBD-ODBC 1.50 (DB is SQLServer 2008 10.0.5500) |
Date: | Fri, 16 Jan 2015 14:56:54 -0800 |
To: | bug-DBD-ODBC [...] rt.cpan.org |
From: | laura <lorgle [...] gmail.com> |
Hi there,
Found this address as the quickest way to report a bug in DBD::ODBC via
rt.cpan.org/Public/Bug/Report.html?Queue=DBD-ODBC so am writing.
Distribution: DBD-ODBC-1.50
Perl version: 5.20.1 (Strawberry perl, 32-bit version)
Operating System: MS Windows 7 Professional SP1
We ran into some odd behavior with DBD::ODBC when we upgraded from 1.43 to
1.50 recently - previously-working insert statements (using placeholders)
started failing with a "DBD::ODBC::st execute failed: [Microsoft][ODBC SQL
Server Driver]String data, right truncation (SQL-22001)" error message -
even if the only data being inserted was numeric. Not all inserts failed,
but the majority did (982 out of 1000 would fail). I tried a little
testing (test_load.pl, attached) and found that the first insert would
succeed, but subsequent ones failed, regardless of the data values being
inserted. I could get the inserts working if, instead of using
placeholders, I built the statement anew for each row. (Of course, that
came along with a significant performance hit.)
Reverting to DBD-ODBC-1.43 resulted in all methods being able to
successfully insert the data into our table.
The output of the test script running with DBD-ODBC-1.50 is attached
(test_output_DBD-ODBC-1.50.txt), as is the output of the same script
running with DBD-ODBC-1.43 (test_output_DBD-ODBC-1.43.txt).
If there's more info/traces I can gather that would be helpful, just let me
know and I'd be happy to.
Thank you for making DBD-ODBC possible!
Laura
lorgle@gmail.com
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.