Here is the code to get a cursor variable
my $sth1 = $dbh->prepare(q{
BEGIN
foo(:CUR);
END;
});
$sth1->bind_param_inout(":CUR", \$sth2, 0, { ora_type => ORA_RSET } );
$sth1->execute();
----- Original Message -----
From: "Thutika, Srinivas (ODC - Satyam)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 4:17 PM
Subject: DBI - Returning cursor reference variables
> hi,
>
> I am trying to invoke a stored procedure (written in PL/SQL).
> The procedure called foo has 4 parameters. 3 are "in" parameters and the
> 4th one is "in out" parameter.
> The 4th parameter is a cursor reference variable (the pointer to the
memory
> that I am trying to return to my Perl module)
> Pls let me know how to access that cursor variable in PERL
> I am invoking this procedure foo as follows.
> {
> $sth = $dbHandle -> prepare ("BEGIN foo (?,?,?, ?); END;");
> $sth -> bind_param (1, 'login');
> $sth -> bind_param (2, 0);
> $sth -> bind_param (3, 1157);
> $sth -> bind_param_inout (4, \$rows, 10000); //here i cann't mention
> the maximum length
> $sth -> execute (); print $rows;
> }
>
> > --Thanks& Regards
> > Srinivas Thutika
> >
> >
> >
>