Hello, Sorry for not posting the codes earlier. Herewith i've posted my Oracle stored procedure, Perl code and the error i get. Any help after going thru' these would be very greatful. Thanks in advance.
# ORACLE STORED PROCEDURE # CREATE OR REPLACE PACKAGE selectall AS TYPE my_cursor IS REF CURSOR; PROCEDURE CATEGORYLIST1(CAT_CURSOR OUT my_cursor); END selectall; / CREATE OR REPLACE PACKAGE BODY selectall AS PROCEDURE CATEGORYLIST1(CAT_CURSOR OUT my_cursor) IS BEGIN OPEN CAT_CURSOR FOR SELECT KP_CH_CATEGORY_NAME FROM KP_CH_CATEGORY ORDER BY KP_CH_CATEGORY_NAME; CLOSE CAT_CURSOR; END CATEGORYLIST1; END selectall; / # Perl code # #!/usr/bin/perl -w BEGIN { $|=1; open(STDERR,">&STDOUT"); print("content-type:text/html\n\n"); } use CGI qw/:all/; use DBI; use DBD::Oracle qw(:ora_types); $ENV{ORACLE_HOME}="/u01/app/oracle/product/8.1.7"; my $dbh = DBI -> connect('dbi:Oracle:host="192.168.7.80";sid="ktpn";po +rt=1521"', 'cwl', 'cwl', { RaiseError => 1, AutoCommit => 1 } ) || die "Error while connecting to database : $! \n"; my $sth = $dbh->prepare(q{BEGIN:selectall.CATEGORYLIST1(:p_my_cursor); + END;}); my $my_cursor; print "Executed upto this point"."\n"; $sth->bind_param_inout(":p_my_cursor", \$my_cursor, 0, { ora_type => O +RA_RSET }); $sth->execute; $sth->finish; my @row; while( @row = $my_cursor->fetchrow_array) { foreach $_ (@row) { print $_; print "\n"; } } $my_cursor->finish; $dbh->disconnect; # ERROR # Executed upto this point DBD::Oracle::st execute failed: ORA-01008: not all variables bound (DB +D ERROR: OCIStmtExecute) at /var/www/html/narayan/cgi-bin/Try.cgi lin +e 19. DBD::Oracle::st execute failed: ORA-01008: not all variables bound (DB +D ERROR: OCIStmtExecute) at /var/www/html/narayan/cgi-bin/Try.cgi lin +e 19.

In reply to Re: Re: How I can get the returned cursor from database in PERL program? by Anonymous Monk
in thread How I can get the returned cursor from database in PERL program? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.