Toad World® Forums

How to test for null cursor variable?


#1

I have a stored procedure that has a sys_refcursor as an OUT variable. Under error conditions, the cursor variable is expected to be null. Maybe I’m being dense but I can’t figure out how, within Test Builder or Test Editor, to indicate that the cursor variable is expected to be null. Any ideas?


#2

I think maybe I can simply delete the outcome for the cursor variable, but it would be better if I could check that it was null. I’d like to give it a try, but I seem to have run into another problem where I get ‘insufficient privilege’ errors from QU_TEST line 228 which is preventing my tests from running.

BTW, I’m using the 1.5 beta.


#3

Bindu,

I have already communicated with you regarding the ORA-1301. It is probably due to your schema not having the CREATE TYPE privilege. We should be checking for it, but perhaps we missed that.

Now, as for the "null cursor variable…do you mean you want to see if the cursor variable is not even open? You can ask is a CV is empty (no rows). But we don’t yet support a check to see if the CV is not even open.

Good idea! I will add that to our ER list.

Is that what you are after?

SF


#4

Yes, under error conditions my sproc returns without opening the CV.

Bindu Purhar

AREVA T&D Inc.
10865 Willows Road NE
Redmond, WA 98052
(425) 250-2604

CONFIDENTIALITY: This e-mail and any attachments are confidential and may
be privileged. If you are not a named recipient, please notify the sender
immediately and do not disclose the contents to another person, use it
for any purpose or store or copy the information in any medium.

Community Email
01/23/2007 08:03 PM

    To: Bindu PURHAR/USBVE01/TDE/AREVA-TD@ATD
    cc:
    Subject: Watch update: new message in forum Testing

Datasets: Tables, Views, Queries, Cursor Variables by Jeff Smith
[1jKDo2-9E-1nB]

bindu purhar,

The forum “Testing Datasets: Tables, Views, Queries, Cursor Variables”,
which you have flagged for email nofication, was updated on Jan 23, 2007
8:02:31 PM by Jeff Smith.

Jeff Smith posted the following message: