sachinmozarkar has asked for the wisdom of the Perl Monks concerning the following question:

I am getting the following error



DBD::Oracle::st execute failed: ORA-01008: not all
variables bound (DBD ERROR: OCIStmtExecute) [for
Statement "SELECT ......

For the below

My function is like this
fun
{
$self = shift;
$cCompany = shift;
my $query = "SELECT Column1,Column2,Column3,Column4".
" FROM " . $self->{tableName} .
" WHERE ". $self->{cKey} . "= :cCompany";
$self->{_sth} = $self->{_dbh}->prepare($query)
$sth->bind_param(':cCompany',$cCompany);
$self->{_sth}->execute();
}
Please help me for the above

Replies are listed 'Best First'.
Re: DBD::Oracle::st execute failed
by mje (Curate) on Nov 05, 2009 at 13:12 UTC

    I'm assuming you have a typo in the code you posted as $sth is not mentioned anywhere except in the bind_param call.