Yes, I was able to reproduce your result with this configuration:

Perl 5.8.7, DBI v1.53 and DBD::ODBC v1.13, connectiong to MSSQL2000.

Seems that any number of zeros (:0, :00, :000) will cause the "problem",
as long as it is NOT followed by any other numeric digits.

-----Original Message-----
From: Andon Tschauschev [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 1:34 AM
To: dbi-users@perl.org
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: DBD::ODBC tries to bind nonexisting placeholders

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

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Reply via email to