Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> cursors and perl DBD::Oracle
using the perl module DBD::Oracle
i can use bind_param_inout to fetch from a cursor,
but i haven't figured out how to close the cursor.
They seem to persist until i disconnect from the database.
here is my perl code:
sub execute_function {
my ($func_name, @params_in) = @_;
my ($params, $sth, $curh);
for (0..$#params_in) {
$params .= ":in$_, ";
}
$params = substr($params, 0, -2);
$sth = $dbh->prepare(qq{
BEGIN :curout := $func_name($params); END; }) or warn($dbh->errstr);
$sth->bind_param_inout(":curout", \$curh, 1, { ora_type =>
ORA_RSET } );
for (0..$#params_in) {
$sth->bind_param(":in$_", $params_in[$_]);
}
$sth->execute() or warn($dbh->errstr);
$sth->finish;
DBI::dump_results($curh);
$curh->finish;
}
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Apr 26 2000 - 00:00:00 CDT
![]() |
![]() |