Toad World® Forums

Changing RefCusor attributes of function return value


#1

I was testing a function that returns a sys_refcursor. One of the outcomes I have is to check the # of rows in the returned cursor. I defined the cursor attributes with a query. After the test case was set up, the attributes of the returned cursor changed. When I went into my test case to update the query that the cursor is based on, I got:

ORA-06504: PL/SQL: Return types of Result Set variable or query do not match

Is there some other way to update the attributes that are expected in the returned cursor?

Thanks,
Mitch


#2

I find that behavior odd. I will see if I can reproduce and then get back to you.

SF


#3

Mitch,

Well, I went through basically the same steps as you (at least I did on 1.8.3 - I will check on 1.8.2 as well).

So…could you please send to me (steven.feuerstein@quest.com) a support bundle that includes this program?

And in case I have trouble reproducing even then, can you please tell me:

  1. When do you get this error? Were you in Test Builder, trying to run right after making the change?

  2. Does the error appear in the Results Viewer or in Test Builder? Can you include a screen shot that shows the error and also hopefully the error stack that shows on which line the error occurs in the test package?

Thanks, SF


#4

Steven,

The error is reported in the results viewer (i.e. with a red X button next to it).

Unfortunately the system I’m running on is not connected to the internet, so I won’t be able to send a support bundle. However, I’ll try to provide you some more details …

Thanks,
Mitch


#5

It seems I may have jumped the gun on this one … I went back and verified that the process I described for changing the cursor attributes DOES in fact work. The behavior I was observing had nothing to do with changing the attributes.

I apologize for the misinformation. Mea culpa.

-Mitch