why invalid DBI

Hi folks-
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);
        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);
        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.

Thanks in advance.
_Anand




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

0
babu_anand
3/9/2001 5:14:54 AM
perl.dbi.dev 1960 articles. 0 followers. Follow

1 Replies
668 Views

Similar Articles

[PageSpeed] 23

This question belongs in dbi-users@perl.org, _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" <babu_anand@hotmail.com>
To: <dbi-dev@perl.org>; <dbi-dev-help@perl.org>
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.


0
mchase
3/9/2001 6:14:58 PM
Reply:

Similar Artilces:

[perl5-dbi/DBI-Test] a2d1b2: create separate tests for DBI and DBI::Mock ...
----==_mimepart_51f946a54bb1b_2af891bd4c100430 Date: Wed, 31 Jul 2013 10:17:25 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <51f946a54c721_2af891bd4c100582@hookshot-fe3-pe1-prd.aws.github.net.mail> Branch: refs/heads/master Home: https://github.com/perl5-dbi/DBI-Test Commit: a2d1b22d134be0ca353e0f0b312fb14da24c798e https://github.com/perl5-dbi/DBI-Test/commit/a2d1b22d134be0ca353e0f0b312fb14da24c798e Author: Jens Rehsack <sno@netbsd.org> Date: 2013-07-31 (Wed, 31 Jul 2013) Changed ...

[perl5-dbi/dbi]
----==_mimepart_515e8f3785207_523740c1306299e Date: Fri, 05 Apr 2013 01:45:43 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <515e8f3787c27_523740c13063084@hookshot-fe5-pe1-prd.aws.github.net.mail> Branch: refs/heads/trunk Home: https://github.com/perl5-dbi/dbi ----==_mimepart_515e8f3785207_523740c1306299e-- ...

[perl5-dbi/dbi] fc2ec2: add DBI::Test dependency
----==_mimepart_5169ac8ba2c2a_4a479bb1304466c Date: Sat, 13 Apr 2013 12:05:47 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <5169ac8ba5319_4a479bb13044782@hookshot-fe3-pe1-prd.aws.github.net.mail> Branch: refs/heads/dbi-test Home: https://github.com/perl5-dbi/dbi Commit: fc2ec21c76f2d70d504dfa53fa4766c477eb8ac5 https://github.com/perl5-dbi/dbi/commit/fc2ec21c76f2d70d504dfa53fa4766c477eb8ac5 Author: Jens Rehsack <sno@netbsd.org> Date: 2013-04-13 (Sat, 13 Apr 2013) Changed paths: ...

[perl5-dbi/dbi] 98586f: Fix loading issue without DBI.so
----==_mimepart_52398602338f6_63d8e3bd5410714f Date: Wed, 18 Sep 2013 03:52:50 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <523986023429c_63d8e3bd54107271@hookshot-fe2-pe1-prd.aws.github.net.mail> Branch: refs/heads/dbi-test-conditional Home: https://github.com/perl5-dbi/dbi Commit: 98586fedb09129c4569dcc0f9cdd444384b144f2 https://github.com/perl5-dbi/dbi/commit/98586fedb09129c4569dcc0f9cdd444384b144f2 Author: Jens Rehsack <sno@netbsd.org> Date: 2013-09-18 (Wed, 18 Sep 2013) Chan...

[perl5-dbi/dbi] 0b3fe3: Fixed VERSION regression in DBI::SQL::Nano
----==_mimepart_519541eb800_3b43d7fdd4200cf Date: Thu, 16 May 2013 13:30:35 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <519541eb3946_3b43d7fdd42019d@hookshot-fe6-pe1-prd.aws.github.net.mail> Branch: refs/heads/master Home: https://github.com/perl5-dbi/dbi Commit: 0b3fe3d8b14c2280e27032c8ea52d1a3c4c133c1 https://github.com/perl5-dbi/dbi/commit/0b3fe3d8b14c2280e27032c8ea52d1a3c4c133c1 Author: Tim Bunce <Tim.Bunce@pobox.com> Date: 2013-05-16 (Thu, 16 May 2013) Changed paths: M...

[perl5-dbi/dbi] 735101: rename testcases to basename DBI::Test::Case
----==_mimepart_51ffd5906fa93_69e95a7d505505 Date: Mon, 05 Aug 2013 09:40:48 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <51ffd590709ac_69e95a7d50551df@hookshot-fe6-pe1-prd.aws.github.net.mail> Branch: refs/heads/dbi-test Home: https://github.com/perl5-dbi/dbi Commit: 735101b43ae1899ddaa6dfc696401839f8b1fffa https://github.com/perl5-dbi/dbi/commit/735101b43ae1899ddaa6dfc696401839f8b1fffa Author: Jens Rehsack <sno@netbsd.org> Date: 2013-08-05 (Mon, 05 Aug 2013) Changed paths: ...

DBI::Format in DBI-1.34 vs. DBI-Shell-11.91
There seem to be conflicting versions of DBI::Format in DBI-1.34 and DBI-Shell-11.91. After upgrading to the recent DBI-1.34 I again get a warning from the CPAN "r" command which reports that there is a more recent version of DBI::Format to be found in DBI-Shell-11.91.tar. When I read that the new DBI-1.34 removed the old DBI::Shell from distribution, I was surporised that it kept DBI::Format. I couldn't find any perl references in DBI-1.34 that refered to DBI::Format, so perhaps if the official DBI::Format is being kept up to date in DBI-Shell-11.91, you could ...

[perl5-dbi/dbi] b80de3: Make DBI::_handles return only the outer handle in...
----==_mimepart_5286b894b9afd_601c6e3d54169385 Date: Fri, 15 Nov 2013 16:13:08 -0800 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <5286b894ba6b0_601c6e3d541694af@hookshot-fe2-pe1-prd.aws.github.net.mail> Branch: refs/heads/master Home: https://github.com/perl5-dbi/dbi Commit: b80de3eb5d5bd1c469391218dbc91e9f5895e4a5 https://github.com/perl5-dbi/dbi/commit/b80de3eb5d5bd1c469391218dbc91e9f5895e4a5 Author: Tim Bunce <Tim.Bunce@pobox.com> Date: 2013-11-14 (Thu, 14 Nov 2013) Changed paths: ...

[perl5-dbi/dbi] 0c17b7: Include Jens' work for DBI-Test
----==_mimepart_521d9d9e8d573_74699e7d4814086d Date: Tue, 27 Aug 2013 23:50:06 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <521d9d9e8e411_74699e7d48140935@hookshot-fe4-pe1-prd.aws.github.net.mail> Branch: refs/heads/dir_search_hashes Home: https://github.com/perl5-dbi/dbi Commit: 0c17b78ff80873945276cd8ffc08876be8ebfd8d https://github.com/perl5-dbi/dbi/commit/0c17b78ff80873945276cd8ffc08876be8ebfd8d Author: H.Merijn Brand - Tux <h.m.brand@xs4all.nl> Date: 2013-08-12 (Mon, 12 Aug 2013)...

[perl5-dbi/DBI-Test] 297a33: Move FixtureProvider into DBI::Test namespace.
----==_mimepart_5325d285a2e16_f5df47d38194b5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Branch: refs/heads/master Home: https://github.com/perl5-dbi/DBI-Test Commit: 297a33aaf239b376f49ea6665cee7a23c4e720e6 https://github.com/perl5-dbi/DBI-Test/commit/297a33aaf239b376f49ea6665cee7a23c4e720e6 Author: Tim Bunce <Tim.Bunce@pobox.com> Date: 2014-03-16 (Sun, 16 Mar 2014) Changed paths: A sandbox/tim/lib/DBI/Test/FixtureProvider/CSV.pm A sandbox/tim/lib/DBI/Test/FixtureProvider/DBM.pm A sandbox/tim/lib/DBI/Test/Fi...

[perl5-dbi/DBI-Test] 259b89: perltidy lib/DBI/Mock.pm
----==_mimepart_51de492438906_56b10afdd8124440 Date: Wed, 10 Jul 2013 22:56:52 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <51de492439365_56b10afdd81245a8@hookshot-fe2-pe1-prd.aws.github.net.mail> Branch: refs/heads/master Home: https://github.com/perl5-dbi/DBI-Test Commit: 259b8946d0112c630dfc1d1807824fd6305ca46c https://github.com/perl5-dbi/DBI-Test/commit/259b8946d0112c630dfc1d1807824fd6305ca46c Author: Jens Rehsack <sno@netbsd.org> Date: 2013-07-10 (Wed, 10 Jul 2013) Changed ...

[perl5-dbi/DBI-Test] 9016ab: Replace %$DBD_DBM_SETTINGS our var with use of DBI...
----==_mimepart_52cd4b65d99a9_473dd75d481011f8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Branch: refs/heads/master Home: https://github.com/perl5-dbi/DBI-Test Commit: 9016ab6b16ca17737ba583c93ae0248be4649a6d https://github.com/perl5-dbi/DBI-Test/commit/9016ab6b16ca17737ba583c93ae0248be4649a6d Author: Tim Bunce <Tim.Bunce@pobox.com> Date: 2014-01-08 (Wed, 08 Jan 2014) Changed paths: M sandbox/tim/lib/Context.pm M sandbox/tim/tumbler.pl Log Message: ----------- Replace %$DBD_DBM_SETTINGS our var with us...

[perl5-dbi/dbi] #7
----==_mimepart_51f249fda6165_501ad6dd506353d Date: Fri, 26 Jul 2013 03:05:49 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <51f249fda6db6_501ad6dd506369a@hookshot-fe5-pe1-prd.aws.github.net.mail> Branch: refs/tags/1.628 Home: https://github.com/perl5-dbi/dbi ----==_mimepart_51f249fda6165_501ad6dd506353d-- ...

[perl5-dbi/dbi] #2
----==_mimepart_526e5df4dfbc2_71ffccfd58626c Date: Mon, 28 Oct 2013 05:52:04 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <526e5df4e058c_71ffccfd58627e3@hookshot-fe2-pe1-prd.aws.github.net.mail> Branch: refs/tags/1.630 Home: https://github.com/perl5-dbi/dbi ----==_mimepart_526e5df4dfbc2_71ffccfd58626c-- ...

[perl5-dbi/dbi] #2
----==_mimepart_515e8f3739a60_2b4753813074529 Date: Fri, 05 Apr 2013 01:45:43 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <515e8f373c6d3_2b47538130746e7@hookshot-fe4-pe1-prd.aws.github.net.mail> Branch: refs/heads/sqlengine Home: https://github.com/perl5-dbi/dbi ----==_mimepart_515e8f3739a60_2b4753813074529-- ...

Web resources about - why invalid DBI - perl.dbi.dev

Invalids' Cemetery - Wikipedia, the free encyclopedia
... in 1748 to provide burial grounds for those veterans wounded in the War of the Austrian Succession , who inhabited a nearby hostel ( Invalidenhaus ...

Facebook Has 1.15B Monthly Active Users, But How Many Are Invalid?
Facebook may have reported 1.15 billion monthly active users in its second-quarter earnings report Wednesday, but as of Dec. 31, 2012, approximately ...

Warrants to raid Seven over Schapelle Corby interview deemed invalid
... to raid the offices of Channel Seven in search of proof the network had made a deal with drug smuggler Schapelle Corby, have been ruled invalid ...

High Court rules NSW political donations laws invalid
The High Court has overturned laws that banned corporations and associations from making political donations in state and local government elections. ...

High Court rules ASIO powers on refugee decisions are invalid
High Court rules ASIO powers on refugee decisions are invalid

Supreme Court rules EPA approval of Roe 8 'invalid'
The state's Supreme Court has found the government environmental watchdog was wrong to approve the most hotly contested portion of the Perth ...

Thai election ruled invalid
The Guardian Thai election ruled invalid The Australian THAILAND'S Constitutional Court ruled yesterday that a general election held last ...

WA resource projects at risk of invalid EPA approvals
Twenty-five projects, including 'significant resource projects' which were given environmental approval in the past may be found invalid if challenged, ...

Dotcom search warrants ruled invalid
Search warrants used when 70 police raided the New Zealand mansion of the suspected kingpin of an internet copyright theft ring were illegal, ...

Private deals between US, Japan concerning Diaoyu Islands "invalid": Chinese FM
People's Daily Online Private deals between US, Japan concerning Diaoyu Islands "invalid": Chinese FM People's Daily Online BEIJING,July10( ...

Resources last updated: 12/22/2015 8:35:12 PM