Andon Tschauschev wrote:
Hello everybody,
I'm using DBI v1.51 and DBD::ODBC v1.13. I'm connecting to MSSQL2000/MSSQL2005.
Statements are executed in prepare-execute-fetch order.
Everything works fine, since I found something suspicious: if a string ":00" occurs in a comment, then
DBD::ODBC tries to bind this "placeholder" and break with error "Can't rebind placeholder 00 at
..." (line 1971 in dbdimp.c). The Microsoft ODBC driver produces error "[Microsoft][ODBC Driver Manager]
Invalid parameter number" (described as error number S1093 on
http://www.microsoft.com/technet/prodtechnol/sql/70/proddocs/diag/part3/75528c16.mspx?mfr=true)
Example 1:
<start of sql>
-- :00
SELECT 'FOO'
<end of sql>
Example 1 produces the error above.
Example 2:
<start of sql>
-- :01
SELECT 'FOO'
<end of sql>
Example 2 works fine...
Can anybody else reproduce this error? Is this a bug?
Thanks!
Andon
I think you need to look up odbc_ignore_named_placeholders in the
DBD::ODBC documentation.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com