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 prepare?



On 4/1/06, Peter Loo <[EMAIL PROTECTED]> wrote:
>
> 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, study_prd_days_nbr,
> dlvry_freq_typ_cde, dlvrb_error_flg_desc, std_err_thrhld_nbr,
> std_err_ind, actl_dlvry_dte, dlvry_frmt_typ_desc, study_nam,
> study_anlys_desc, slsfc_nam, client_long_nam, std_err_rsn_desc,
> sob_clsfy_row_cnt, sob_prctr_demo_row_cnt, sob_pay_typ_row_cnt,
> sob_sw_dtl_row_cnt, sob_prctr_row_cnt, sob_unq_ptnt_row_cnt,
> pc_clsfy_row_cnt, pc_ptnt_demo_row_cnt, pc_prctr_row_cnt,
> mkt_cnfgr_gid, itime_prjct_id, client_cntct_nam, dlvrb_nbr) values (?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
>
> Thanks.
>
> Peter
>
>
> --- "Martin J. Evans" <[EMAIL PROTECTED]> wrote:
>
> > 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:
> > >
> > >  sub sub_executeBind($$$) {
> > >    local ($dbh, $sth, $bindVar) = @_;
> > >    $sth->execute(@$bindVar) || die "$dbh::errstr";
> > >    return($sth);
> > >    }
> > >
> > >Will someone please help me understand this error message?
> > >
> > >Thanks in advance.
> > >
> > >Peter
> > >
> > >Peter Loo
> > >Worldwide Consulting, Inc.
> > >Phoenix, Arizona
> > >U.S.A.
> > >
> > >
> > >
> > >
> > >
> > This would suggest there are no parameters in the SQL (i.e. no ? as
> > in "insert into table values (?)").
> >
> > What does $dbh->{Statement}return - it should be the SQL you
> > are executuing.
> >
> > Martin
> >
> >
> >
>
>
> Peter Loo
> Worldwide Consulting, Inc.
> Phoenix, Arizona
> U.S.A.
>



--
--------------------------------------------------------------------------------------------------------------
The darkest places in hell are reserved for those who maintain their
neutrality in times of moral crisis.
    Dante Alighieri (1265 - 1321)

They who would give up an essential liberty for temporary security, deserve
neither liberty or security.
Benjamin Franklin
--------------------------------------------------------------------------------------------------------------

Reply via email to