[EMAIL PROTECTED] wrote:
Hello
I having trouble using placeholders (named and numerical), using DBD::ODBC
connecting to Teradata. I cant easily use ordinary '?', as I refer to the
same placeholder several times in the SQL. For example, this is the
statement I prepare (a contrived example):
INSERT INTO ATABLE
(COLA,COLB,COLC,COLD,COLE,COLF)
VALUES
(:1,:2,:3,:3,:4,:4);
This is the error I get when using numerical place-holders.
DBD::ODBC::st execute failed: [NCR][ODBC Teradata][Teradata Database]
There is a mismatch between the number of parameters specified and the
number of parameters required. (SQL-07001)(DBD: st_execute/SQLExecute
err=-1)
!!NOTE!! The above error is being returned by the database, not DBI. I am
sure I am calling with the correct number of ags, which means DBI is
stuffing up the call to Teradata. This is the error I would have got if I
passed the wrong number of args:
DBD::ODBC::st execute failed: called with 3 bind variables when 4 are
needed
I get a different error when using named placeholders (and yes im sure the
statement was prepared OK with a parm called :COLA):
Can't bind unknown placeholder ':COLA'
Help please, as Im stuck using DO which is very slow!
**********************************************************************
IMPORTANT: This e-mail is intended for the use of the addressee and may
contain information that is confidential, commercially valuable or subject to
legal or parliamentary privilege. If you are not the intended recipient you
are notified that any review, re-transmission, disclosure, use or dissemination
of this communication is strictly prohibited by several Commonwealth Acts of
Parliament. If you have received this communication in error please notify the
sender immediately and delete all copies of this transmission together with any
attachments.
**********************************************************************
You can send me a level 15 trace of this happening with numerical
placeholders and I'll take a look.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com