hibbarra has asked for the wisdom of the Perl Monks concerning the following question:
I am connecting using host, user, password and sid therefore I am bypassing the client and tnsnames.ora. I have to do this as I could not wait for tnsnames.ora to be edited, been 2 months still waiting.DBD::Oracle::st execute failed: ORA-01008: not all variables bound (DB +D ERROR: OCIStmtExecute) [for Statement "SELECT count(*) FROM trans_hist WHERE TO_CHAR(sched_dttm,'YY/MM/DD') = ? and dep_id = ? and file_id = ?" with ParamValues: :p1='07/03/07', :p2= +'1', :p3='300'] at QueMgrDaemon.pl line 2318. Can't execute statement: SELECT count(*) FROM trans_hist WHERE TO_CHAR(sched_dttm,'YY/MM/DD') = ? and dep_id = ? and file_id = ? , ORA-01008: not all variables bound (D +BD ERROR: OCIStmtExecute) at QueMgrDaemon.pl line 2318.
The error is encountered the second time the execute statement is run, first time thru is fine. This leads me to belive its due to some cashed statement not being handled correctly. I don't think it's the code as it runs ok on the SUN box with Perl 5.005_03, but blows up under AIX with Perl v5.8.2. Any and all ideas are welcome, and thanks in advance. Hibbarra{ my $sth; sub CheckTransmissionHist { my ( $FileId, $DepartmentID, $ScheduleDttm) = @_; $ScheduleDttm = '07/03/07'; my $ltqs_dbh = &ConnectToDatabase(); my $SelStatement = "SELECT count(*) FROM trans_hist WHERE TO_CHAR(sched_dttm,'YY/MM/DD') = ? and dep_id = ? and file_id = ?"; unless( defined($sth)) { $sth = $ltqs_dbh->prepare($SelStatement) or die "Can't prepare statement:$SelStatement , $DBI::errst +r"; } $sth->bind_param( 1, $ScheduleDttm ) or die "BOOM"; $sth->bind_param( 2, $DepartmentID ) or die "BOOM"; $sth->bind_param( 3, $FileId ) or die "BOOM"; $sth->execute() or die "Can't execute statement: $SelStatement , $DBI:: +errstr"; .... ....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI problem on AIX/Oracle 10g
by runrig (Abbot) on Jul 24, 2007 at 23:22 UTC | |
|
Re: DBI problem on AIX/Oracle 10g
by fmerges (Chaplain) on Jul 24, 2007 at 20:14 UTC | |
|
Re: DBI problem on AIX/Oracle 10g
by fstat(pipe) (Scribe) on Jul 24, 2007 at 22:52 UTC | |
|
Re: DBI problem on AIX/Oracle 10g
by fmerges (Chaplain) on Jul 24, 2007 at 17:45 UTC | |
by hibbarra (Novice) on Jul 24, 2007 at 18:01 UTC | |
|
Re: DBI problem on AIX/Oracle 10g
by smithers (Friar) on Jul 25, 2007 at 18:30 UTC | |
by hibbarra (Novice) on Jul 27, 2007 at 17:35 UTC | |
by smithers (Friar) on Jul 28, 2007 at 16:56 UTC |