Hi,
I have a stored procedure that calls 2 other stored procedures and combines the results into a temporary table. The results of the temporary table is then returned from the stored procedure.
When I execute the stored procedure in Query Analyzer, I get the exact data I want in the correct format - no errors.
When I execute that stored procedure in Omnivex SQL Link 3, I get an "Invalid Cursor State" error.
I did some digging on that error, and found that it could be related to print statements within the stored procedures. I removed all print statements from all 3 stored procedures and the error is still occuring.
Any suggestions?I suggest you post the code for the stored procedure and somebody will help you rewrite it without using a cursor. 99 times out of 100 they aren't necessary and only impede performance.|||Dude...I don't believe they are using a Cursor in the code...
What is Omnivex SQL Link 3 anyway?
EDIT: AHA
http://www.omnivex.com/index.asp
Is there code on the SQL Link side? Or does it act like ODBC...my Guess it's middleware and that's where you're problem resdies|||Good point.
I wonder if the stored proc might be returning spurious information before the final recordset. Maybe a simple SET NOCOUNT ON would solve the problem.|||That is brilliant! The SET NOCOUNT ON/OFF did the trick! Thank you so much!!!!|||"An expert is a person who has made all possible mistakes in a very narrow field." - Niels Bohr
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment