ORA-01023: Cursor context not found in combination with Microsoft OLE DB -2147467259
I've build a webapplication using ASP on a ORACLE database. (ASP, Oracle 10G, windows2003server)
In several test environments everything works fine.
In production however I keep getting this error:
ORA-01023: Cursor context not found (Invalid cursor number)
Source: Microsoft OLE DB Provider for Oracle number: -2147467259
The error appears when I execute a stored procedure in the following code snippet
' Set stored procedure name
dbObject.SP = "NAME"
(15 parameter creations)
Only executing this particular stored procedure creates this problem. And it only occurs on one server (unfortunately the production server) On all testservers its working just fine.
I've tested already a lot of things. I'm running the code of the stored procedure directly on the database and that works fine. So I'm pretty desperate.
I just found out that the test server database is an ORACLE 10G XE and de produktionserver is a standard ORACLE 10G database. I hope this doesnt cause the problem.
I've solved the problem and want to write down the sollution here too. Maybe its helpfull for somebody.
I call a stored procedure with about 13 parameters from my asp page. I use one in/out parameter, 9 in parameters and 3 out parameters. And the out parameters are the problem. It seems that only 2 out parameters of the type VARCHAR2 or VARIANT are supported. Using more than 2 out parameters of the type varchar2 or variant causes the error ORA-01023: Cursor context not found (Invalid cursor number)
Source: Microsoft OLE DB Provider for Oracle number: -2147467259.
Strangely it only does that on one server.
Now I concatenate two OUT parameters first and later in de code SPLIT them again. This works fine.
Nice research, Thank you also for posting the solution.
Congrats! way to go.
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Thanks for the previouse post, which helped me to find the issue.
I have find one more important thing about the CharacterSet of the Database.
I got the same issue when migrating my DB to Oracle 11G. And got the same issue as mentioned in the thread.
We build the DB with the character set : - AMERICAN_AMERICA.WE8ISO8859P15 [non-unicode]. Which accepts the more than 2 char/varchar type output parameters, hense resolved the issue.
Click Here to Expand Forum to Full Width