Hi Everybody / Anybody,
Can some one tell me whether there is a DBI module available
For ActiveState perl 5:0:06. I need to use DBI on WindowsNT
Work station. The Database is Oracle8i.
Thanks,
Raj
-----Original Message-----
From: Jonathan Gines [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 11:20 AM
To: Sundarraj, Senthil Kumar (Cognizant);
[EMAIL PROTECTED]
Subject: Re: Problem...
I'll assume you can connect to Oracle although you should
enclose your
DBI->connect with "eval", but anyways have u also tried
using DBI->trace()
to "see" what is actually being fetched? place parens
around @data and c
if that makes a difference. just some thoughts, though it's
been awhile
since i've coded in perl
you can also try just using fetchrow like:
while ( (@data) = $rv->fetchrow() )
{
print "@data\n";
}
At 03:35 PM 7/30/02 +0530, Sundarraj, Senthil Kumar
(Cognizant) wrote:
>Hi All,
>
> I have a stored procedure as like this..
> procedure example
> is
> cursor html_cur
> is
> select a, b from html_bill ;
> a varchar2(20);
> b varchar2(20);
> BEGIN
> NULL;
> END;
>
> The table html_bill contains 5 records.
>
> am using a perl script like below to invoke the
stored procedure.
>
> use Oraperl;
> my ($sth, $stmt,$SQL, $return);
> $dbh=
>DBI->connect('dbi:Oracle:host=hostname;sid=net','test','test');
>
> $SQL = "BEGIN example; END;";
> $func= $dbh->prepare($SQL);
> $rv = $func->execute;
> print "No of rows = " . $func->rows() . "\n";
> while(@data=$func->fetchrow_array){
> print "@data\n";
> }
>
> if ( $@ ) {
> warn " Execution of stored procedure
failed:
>$DBI::errstr\n";
> $dbh->rollback();
> }
> print "Excution of stored procedure returned
$rv\n";
> $dbh->disconnect();
>
> It says Number of rows as 1 and am not able to
fetch the selected
>rows(it says some error).
>
>Any idea how to manipulate the selected rows.
>
>Senthil Kumar
>3rd Floor,27,Whites Rd
>ph # 044 - 8529917/8526917 x : 3791
>