This question belongs in [EMAIL PROTECTED], _NOT_ dbi-dev.
If this is new code, I strongly recommend using DBI instead of Oraperl.
Oraperl.pm is just a wrapper around DBI calls for Oracle, so you are using
it inadvertently anyway. The newer interface provides several ways to check
for errors and to fetch rows from your queries.
--
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: "Anand Babu Perikala" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 9:14 PM
Subject: why invalid DBI
> I am using Oraperl and I am having the error like
> "Invalid DBI handle". The code lookd like this way
>
> $stmt = 'SELECT SYSDATE FROM DUAL';
> $fn = &ora_open($lda, $stmt);
# I'd write this as:
# $fn = ora_open( $lda, $stmt ) or die "Can't get SYSDATE, $DBI::errstr";
# If you don't check for errors, you never know where your program really
failed.
> while ((@arr) = &ora_fetch($fn))
> {
> $CREATE_DATE = $arr[0];
> }
> &ora_close($fn);
>
> $REQ_ID = '';
> $stmt1 = 'SELECT UAI_SEQQA.NEXTVAL FROM DUAL';
> $fn1 = &ora_open($lda, $stmt1);
# I'd write this as:
# $fn1 = ora_open( $lda, $stmt1 ) or die "Can't get next UAI_SEQQA,
$DBI::errstr";
> while ((@arr1) = &ora_fetch($fn1))
> {
> $REQ_ID = $arr1[0];
> }
> &ora_close($fn1);
>
> In the first one is OK. The problem is with the second ora_close
statement.
> I am sure that I had defined the sequence for UAI_SEQQA.