Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help, Invalid Cursor (ref cursor)

Help, Invalid Cursor (ref cursor)

From: David Pattinson <david_at_addease.com.au>
Date: Wed, 09 Jun 1999 12:35:43 +1000
Message-ID: <375DD2FF.FEB5C60F@addease.com.au>


I have an interesting problem, (at least it's interesting me....).

I use ref cursors to return data from Oracle* stored procedures to my PowerBuilder app. The ref cursor is passed into the procedure as the final (IN OUT) parameter. The cursor is opened at the end of the procedure to return the data. Occasionally one of these stored procedures needs to raise an application error. (raise_application_error(-20000, 'My error text');)

The problem is that if I raise an application error prior to opening the ref cursor, PowerBuilder reports an invalid cursor error. If I raise the same application error after opening my ref cursor the correct error message is reported. I believe that this is because the ref cursor is effectively still a null pointer. I would like to know if there is a standard way of initialising a ref cursor to some dummy value so that I can avoid this problem. Otherwise I may have to get a little more tricky with my error handling?

Thanks, David. Received on Tue Jun 08 1999 - 21:35:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US