Hi:
I am trying to execute a piece of code that works in one 
variation and dumps core in another. 
The one which works is 

my ($stmt);
eval {
  $stmt=$db->prepare_cached ("update job_queue set  
                    status_flag='JDP' where sid= $sid ");
  $stmt->execute;
  $stmt->finish;
};
if ($@) {
  $error_string=DBI->errstr;
  print "Some Error ".DBI->errstr."\n";
  $statement->finish;
  $db->disconnect;
  return -2;
}

Following is the part which dumps core. Please note that the 
only change is that i am trying to use a bind variable in this 
case.

my ($stmt);
eval {
  $stmt=$db->prepare("update job_queue set 
                      status_flag='JDP' where sid= ? ");
  $stmt->execute($sid);
  $stmt->finish;
};
if ($@) {
  $error_string=DBI->errstr;
  print "Some Error ".DBI->errstr."\n";
  $statement->finish;
  $db->disconnect;
  return -2;
}

Here is the error that gets dumped on the console

DBD::Oracle::st execute failed: Error while trying to retrieve 
text for error ORA-03113 (DBD ERROR: OCIStmtExecute) 
at ./job_daemon.pl line 114.
Segmentation Fault (core dumped)

Would appreciate any input

Thanks
Ali


________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

Reply via email to