Page 1 of 1

"Cursor not returned from Query" from SELECT statement

Posted: Thu 17 Jun 2010 21:24
by esasse
I have some valid SELECT statements that when I send to MSSQL2005 sometimes return the error "Cursor not returned from Query".

It happens with different queries that work fine 99% of the time, and the only thing they all have in common is the use of several joins and some group by. Pretty standard queries.

How can I trace this and find out what's wrong?

Posted: Fri 18 Jun 2010 08:48
by Dimon
This error occurs when a query that doesn't return recordset is executed, like INSERT, DECLARE and etc.
Try to use SQL Server Profiler to check what query is executed when the error occurs.