As I mentioned in my previous email (see lines marked with '#') only problem
I see is that you are not checking for errors. As a result you don't really
know where your problem starts.
--
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]>
Sent: Friday, March 09, 2001 10:38 AM
Subject: Re: why invalid DBI
> Thanks a lot for your reply. In future I will send the mail to
> [EMAIL PROTECTED]; Apologies for any inconveniance.
> Actully this code is written in Oraperl and is working in the production.
I
> am making a few changes. Is the code below ok.
>
> ----Original Message Follows----
> From: "Michael A. Chase" <[EMAIL PROTECTED]>
> To: "Anand Babu Perikala" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: why invalid DBI
> Date: Fri, 9 Mar 2001 10:14:58 -0800
> From [EMAIL PROTECTED] Fri Mar 09 10:15:36 2001
>
> 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.
>
> ----- 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.