Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 243382 - Last Review: October 17, 2003 - Revision: 2.0
PRB: Select @@Version Not Working on Dynamic Cursors
This article was previously published under Q243382
If a SQL Server FAST_FORWARD cursor or any dynamic cursor is specified, a SELECT * FROM ... command runs properly, but a SELECT @@Version (as well as other selects) appears to hang.
This is by design. SQL Server attempts to create a static cursor whenever a select is issued that is not based on table data. If you have specified a dynamic cursor, SQL Server will fail to create the cursor, and return a Low priority message to that effect. OLE DB will repeat the order to create a dynamic cursor, SQL Server will fail again, and this cycle will be repeated until the connection times out.
The fix for this problem is to specify a static cursor when doing this type of SELECT. ODBC has internal code to downgrade the cursor if a dynamic cursor is requested and the server can't create it. OLE DB does not.
This behavior is by design.
APPLIES TO
- Microsoft OLE DB Provider for SQL Server 7.0
- Microsoft OLE DB Provider for SQL Server 7.01
- Microsoft ActiveX Data Objects 1.0
- Microsoft ActiveX Data Objects 2.0
- Microsoft ActiveX Data Objects 2.1
- Microsoft ActiveX Data Objects 2.5
- Microsoft ActiveX Data Objects 2.6
| kbdatabase kbprb KB243382 |
Retired KB Content DisclaimerThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate