Clarification on DBI module
- From: ramesh_thangamani@xxxxxxxxxxx (Ramesh Thangamani)
- Date: Wed, 9 May 2007 00:09:23 -0700 (PDT)
Hi,
Can you please clarify my doubts regarding DBI perl module used for database connection.
In my environment I am using single module to prepare and execute the sql queries. The sql query can have bind variables or they may not have. In order to improve performance i used prepare() and execute() sequence for the queries.
Recently I am facing a issue. When i prepare a query with bind variables and pass the bind variables in execute() method it works fine, but second time if i invoke without passing bind variables it returns the previous query results and it is not throwing the error:
DBD::Oracle::st execute failed: ORA-01008: not all variables bound (DBD ERROR: OCIStmtExecute) [for Statement "
Which i believe is the expected behaviour since i should pass bind variables without which the query should fail. How come the execute functions fine without bind variables in the second/multiple query runs.
Is there a way to solve this issue other that re preparing the query ?.
Tried searching on Web regarding this issue but couldn't find any discussion on this.
Thanks,
Ramesh
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
- Follow-Ups:
- Re: Clarification on DBI module
- From: Jonathan Leffler
- Re: Clarification on DBI module
- From: John Scoles
- Re: Clarification on DBI module
- Prev by Date: Re: Trapping error for $dbh->do()
- Next by Date: Re: Clarification on DBI module
- Previous by thread: Trapping error for $dbh->do()
- Next by thread: Re: Clarification on DBI module
- Index(es):
Relevant Pages
|