If you are writing new code, you'd be better off using the DBI method calls instead of the Oraperl ones. Under Perl 5, Oraperl is just an emulation layer over DBI and DBD::Oracle. The people here, including me, are more likely to be able to help with DBI calls. I'm not sure I understand what is happening, so I'll restate what I think you're saying: When you call ora_open() with an invalid SQL string, the subroutine does not return, but causes the program to abort instead. See if these give calls in the appropriate places more information about the problem: my $lda = ora_logon( $inst, $uid, $pwd ) or print( "Ora_logon() failed, $ora_errstr" ), return -1; my $Sql = "bad SQL" ora_open( $lda, $Sql ) or print( "Ora_open() failed at xxx, $ora_errstr" ), return -1; The error handling is much easier under DBI, so I again suggest you start using it where possible. Since Oraperl is just an emulation layer, $lda is really a DBI database session handle (like $dbh in the documentation) and $csr is really a DBI statement handle (like $sth in the documentation) so you can start using DBI calls with your Oraperl handles. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 01, 2001 9:52 PM Subject: Report for Oraperl > I have met some trouble for oraperl. I need your help. > > I am using Cgi(oraperl) to access oracle database with > > &ora_open($lda,$Sql). But when I input a wrong Sql command, > > parameter ($ora_errno) doesn't come back and program is aborted. > > For example: > > 1: $Sql = "insert into table1(abc) "; > 2: &ora_open($lda,$Sql); > 3: if( $ora_errno != 0 )[ > print "Oracle Operation Error!"; > return -1; > } > > When i try it, line 3 isn't executed. How do i do?

Reply via email to