Re: [Sqlrelay-discussion] calling oracle procedures returning multiple REF CURSORs
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2006-01-05 17:08:48
|
You should be able to use more than 1 ref cursor. Looks like there may
be a bug. I'll check it out and let you know what I find.
Dave
dav...@fi...
On Tue, 2006-01-03 at 16:50 -0500, Biswa Chowdhury wrote:
> Hello All,
>
> When calling an Oracle procedure that returns more than one ref cursor,
> SQLRelay returns the same data for all the ref cursors.
>
> Is this a limitation of SQLRelay that or am I not using it correctly ?
>
> Appreciate any help.
>
> Thanks.
>
> Biswa
>
>
> /************************************************************
> * test_ref_cursor.prc - test oracle procedure
> ************************************************************/
> CREATE OR REPLACE PROCEDURE test_ref_cursor(
> p_out1 OUT SYS_REFCURSOR,
> p_out2 OUT SYS_REFCURSOR,
> ) IS
> BEGIN
> OPEN p_out1 FOR SELECT TO_CHAR(SYSDATE,'DD-MON-YYYY') the_date
> FROM DUAL;
> OPEN p_out2 FOR SELECT TO_CHAR(SYSDATE,'HH24:MI:SS') the_time
> FROM DUAL;
> END test_ref_cursor;
> /
>
> /************************************************************
> * test_ref_cursor.pl test perl script
> ************************************************************/
> use SQLRelay::Connection;
> use SQLRelay::Cursor;
>
> $con=SQLRelay::Connection->new("localhost",9000,"","oracletest","oraclet
> est",0,1);
> $cur=SQLRelay::Cursor->new($con);
>
> $cur->prepareQuery("begin test_ref_cursor(:1, :2); end;");
> $cur->defineOutputBindCursor("1");
> $cur->defineOutputBindCursor("2");
> $cur->executeQuery();
>
> # get first rs
> my $bindcur1 = $cur->getOutputBindCursor('1');
> $bindcur1->fetchFromBindCursor();
> print $bindcur1->getField(0,0),"\n";
>
> # get second rs
> my $bindcur2 = $cur->getOutputBindCursor('2');
> $bindcur2->fetchFromBindCursor();
> print $bindcur2->getField(0,0),"\n";
>
>
>
> This correspondence is from Napster, Inc. or its affiliated entities
> and is intended only for use by the recipient named herein. This
> correspondence may contain privileged, proprietary and/or confidential
> information, and is intended only to be seen and used by named addressee(s).
> You are notified that any discussion, dissemination,distribution or copying
> of this correspondence and any attachments, is strictly prohibited,
> unless otherwise authorized or consented to in writing by the sender.
> If you have received this correspondence in error, please notify the
> sender immediately, and please permanently delete the original and any
> copies of it and any attachment and destroy any related printouts without
> reading or copying them.
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|