<p>I got this error when trying to run a query in SQL server query analyzer.
What is the reason?</p>

If you're using cursors, then you've probably closed the cursor. Check out MSDN for more information (
http://support.microsoft.com/kb/15169
3)
If you're not using cursors, then it could be an issue with the server, check the log.