Cursors: Can this DBI::Oracle code be converted to DBI::OCDB?
- From: "telesphore4@xxxxxxxxx" <telesphore4@xxxxxxxxx>
- Date: 11 Apr 2007 15:08:44 -0700
The following code sample works just fine as it is. However, I need to
convert it so that it uses DBI::OCDB. Is this possible?
use strict;
use DBI;
use DBD::Oracle qw(:ora_types);
my $dbh = DBI->connect( 'dbi:Oracle:dsn', 'user', 'password' );
my $sth1 = $dbh->prepare(q{
BEGIN OPEN ? FOR
SELECT * FROM user_tables WHERE table_name like ?;
END;
});
my $sth2;
$sth1->bind_param( 2, $ARGV[0] );
$sth1->bind_param_inout( 1, \$sth2, 0, { ora_type => ORA_RSET } );
$sth1->execute;
while ( my @row = $sth2->fetchrow_array ) {
print "$row[0]\n";
}
$dbh->disconnect;
.
- Follow-Ups:
- Re: Cursors: Can this DBI::Oracle code be converted to DBI::OCDB?
- From: telesphore4@xxxxxxxxx
- Re: Cursors: Can this DBI::Oracle code be converted to DBI::OCDB?
- Prev by Date: RE: TWO_TASK environment variable
- Next by Date: Re: TWO_TASK environment variable
- Previous by thread: RE: :Oracle function
- Next by thread: Re: Cursors: Can this DBI::Oracle code be converted to DBI::OCDB?
- Index(es):