Hi, Monks,
I have a PLSQL script which should return a cursor, see below:
$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:
while (@recs->$sth2->fetchrow_array){}
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.
Any ideas would be very much appreciated.
Thanks
Joe
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.