|
|
| Re: Invalid value for query of REF CURSOR PARAMETER [message #182638 is a reply to message #182633] |
Mon, 17 July 2006 07:52   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
<AskTom>
My car wouldn't start last week. Can anyone help
</AskTom>
Can you give us a little more to work with?
A concise test case that contains everything we need to reproduce the problems would be good (Create table & insert statements if relevant, and a small pl/sql block that produces the error).
Failing that, you could at least show us the code that is produceing the error.
My guess is you'll go for the second of those choices, but I'm prepared to be suprised.
|
|
|
|
|
|
| Re: Invalid value for query of REF CURSOR PARAMETER [message #182679 is a reply to message #182674] |
Mon, 17 July 2006 09:51   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Ah well. No suprises for me today. I'd love to try runniong the code to reproduce the error myself, but as I don't have table definitions or test data, I'll just pluck a few suggestions out of the air
1)
I can find no reference anywhere to an ORA-10296. Can you just double check that that is the error returned.
2)
What happens if you run the query from SQL*Plus - does it return any data
3) What line is the code erroring at?
4) What version of Oracle are you using?
[Updated on: Mon, 17 July 2006 09:55] Report message to a moderator
|
|
|
|
|
|
|
|
| Re: Invalid value for query of REF CURSOR PARAMETER [message #182769 is a reply to message #182767] |
Tue, 18 July 2006 02:40   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
As you still haven't bothered to give us any test data or table creation scripts, I have no idea why the changes you have made might have made a difference.
I would say that it is very unlikely to be the length of the table name that is causing the problem, but if you've got code that works, then go with it.
Next time you might want to consider actually providing us with the information we ask for, and that way you might get the help you want.
One other comment about you code - In the When Others block, your call to DBMS_APPLICATION_INFO will never happen, as it is after the RAISE_APPLICATION_ERROR call.
|
|
|
|
|
|
|
|
| Re: Invalid value for query of REF CURSOR PARAMETER [message #182781 is a reply to message #182776] |
Tue, 18 July 2006 03:11   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Here's a thought.
Your code is specifying schema names for the table, so I'm guessing that the tables are in a schema other than the one owned by your current user.
Are your privileges on these tables granted via a role?
If they are, could you try granting them directly and seeing if you still get the problem occurring?
|
|
|
|
| Re: Invalid value for query of REF CURSOR PARAMETER [message #182782 is a reply to message #182781] |
Tue, 18 July 2006 03:18   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Here's another thought, and one I should have had earlier.
The description of your error is :
| Quote: | ORA-19206 Invalid value for query or REF CURSOR parameter
Cause: The queryString argument passed to DBMS_XMLGEN.newContext was not a valid query or REF CURSOR.
Action: Rewrite the query so that the queryString argument is a valid query or REF CURSOR.
|
The second query you posted is very different to the first (different columns, different number of tables etc etc).
Can you check that your first query (the one in the execute immediate in the OP) is a valid query and returns results.
If it wasn't valid, that would explain the problem quite nicely.
[Updated on: Tue, 18 July 2006 03:18] Report message to a moderator
|
|
|
|
|
|