RE: :ODBC tries to bind nonexisting placeholders



Yes, this is very strange...

Martin Evans offered to try a work-around with
odbc_ignore_named_placeholders, I didn't tried it yet, but since these "placeholders" are in the comment part, they must be simply ignored and not parsed?

Regards

Andon



"CAMPBELL, BRIAN D (BRIAN)" <campbelb@xxxxxxxxxxxxxxxxxx> wrote: 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:atschauschev@xxxxxxxxx]
Sent: Friday, May 04, 2007 1:34 AM
To: dbi-users@xxxxxxxx
Cc: jan.selzer@xxxxxx; lutz.kraeft@xxxxxx; roland.voss@xxxxxx
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:

-- :00
SELECT 'FOO'

Example 1 produces the error above.

Example 2:

-- :01
SELECT 'FOO'

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.



---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
Quantcast