Re: $sth-execute(@$bindVars) is outputting an error

2006-04-03 Thread Jeffrey Seger
I'm posting this back to the list in case anyone else wants to see it. First thing I see is that the number of ? placeholders doesn't appear to be right. I whittled it down to a 2 column table and used your sub_insert to build an insert statement: sub sub_insert($$) { my ($tblName, $columns)

Re: $sth-execute(@$bindVars) is outputting an error

2006-04-03 Thread Peter Loo
Hi Jeffrey, I have found the culprit. It is in the calling program. Instead of using $d_sth like the original program, someone made a change and didn't tell me. I was looking at the copy instead of the one that was having the problem. $d_dbh = sub_prepare($d_dbh, $sqlString); I have made

Re: $sth-execute(@$bindVars) is outputting an error

2006-04-02 Thread Peter Loo
Hi Jeffrey, Here is the calling code: Source database is Oracle using Oracle driver while the destination database is Netezza using ODBC driver. When all fields are populated, the same code appears to work. ($s_stmtType, $s_sqlString) = sub_readSQLFile($s_SQL); $s_sth =

Re: $sth-execute(@$bindVars) is outputting an error

2006-04-02 Thread Jeffrey Seger
And what are the contents of the sql file? Also, I know very little about NetezzaI'm going to assume that it supports placeholders, but does the ODBC Driver for it? On 4/2/06, Peter Loo [EMAIL PROTECTED] wrote: Hi Jeffrey, Here is the calling code: Source database is Oracle using

Re: $sth-execute(@$bindVars) is outputting an error

2006-04-01 Thread Martin J. Evans
Peter Loo wrote: Hi, I am trying to pass an array reference to $sth-execute and I am getting the following error: DBD::ODBC::st execute failed: called with 38 bind variables when 0 are needed at /usr/local/apps/common/devl/bin/GlobalRoutines.pm line 42. The code I am using is as follows:

Re: $sth-execute(@$bindVars) is outputting an error

2006-04-01 Thread Peter Loo
Hi Martin, The value for $dbh-{Statemet} is as follows: insert into p_dlvrb_study_attributes (dlvrb_gid, study_gid, client_gid, slsfc_gid, mkt_def_gid, mkt_def_desc, store_panl_gid, study_anlys_typ_cde, extnd_lkbck_strt_dte, cohrt_strt_dte, cohrt_end_dte, study_end_dte, lkbck_prd_days_nbr,

Re: $sth-execute(@$bindVars) is outputting an error

2006-04-01 Thread Jeffrey Seger
In order to figure out what's going awry, I'd need to see some code. Preferably the minimum amount necessary to replicate the error. Also, do you have multiple statement handles attached to this dbh? Try printing $sth-{Statement} rather than $dbh-{Statement}. Are you checking for errors at the

$sth-execute(@$bindVars) is outputting an error

2006-03-31 Thread Peter Loo
Hi, I am trying to pass an array reference to $sth-execute and I am getting the following error: DBD::ODBC::st execute failed: called with 38 bind variables when 0 are needed at /usr/local/apps/common/devl/bin/GlobalRoutines.pm line 42. The code I am using is as follows: sub