joec_ has asked for the wisdom of the Perl Monks concerning the following question:
$plsql = $dbh->prepare(q{DECLARE hd_cur Pacdesignset.data_header_cur; d_cur Pacdesignset.data_cur;
BEGIN Pacdesignset.get_data(5000,1,hd_cur,:s_cur,d_cur); END;});
$plsql->bind_param_inout(":s_cur",\$sth2,0,{ora_type => ORA_RSET});
$plsql->execute;
I want to return the :s_cur, which is what the bind_param_inout() statement should do, correct?
According to the perldoc for Oracle::DBD, i just do:
to get the rows from the cursor as sth2 is a valid statement handle now. However, when i run it, i get a 'Can't call method "DBI::st=HASH(0x9e455b8)" without a package or object reference at reg_service.pl line 128.' Line 128 is the while statement. All i would like to do in this loop is print out the cursor contents.while (@recs->$sth2->fetchrow_array){}
Any ideas would be very much appreciated.
Thanks
Joe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI & Cursors
by almut (Canon) on Nov 21, 2008 at 12:57 UTC | |
by joec_ (Scribe) on Nov 21, 2008 at 13:13 UTC | |
by mje (Curate) on Nov 21, 2008 at 14:32 UTC | |
|
Re: DBI & Cursors
by tmaly (Monk) on Nov 21, 2008 at 15:00 UTC | |
by joec_ (Scribe) on Nov 21, 2008 at 16:21 UTC | |
by runrig (Abbot) on Nov 21, 2008 at 18:09 UTC | |
by joec_ (Scribe) on Nov 24, 2008 at 09:22 UTC |