Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 914535 - Last Review: November 22, 2007 - Revision: 2.5
FIX: When you use an ActiveX Data Objects Recordset object to access a database in SQL Server 2005, the Recordset object returns no records
Consider the following scenario:
- You use a Microsoft ActiveX Data Objects (ADO) Recordset object to access a database in Microsoft SQL Server 2005.
- The query of the Recordset object is connected to a pair of tables by using a left outer join.
- You set the CursorType property for the Recordset object to adOpenKeyset.
In this scenario, the
Recordset object returns no records.
Note This problem does not occur when you try to access a database in Microsoft SQL Server 2000.
Service pack information
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2005. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
913089Â
(http://kbalertz.com/Feedback.aspx?kbNumber=913089/
)
How to obtain the latest service pack for SQL Server 2005
To work around this problem, use one of the following methods:
- Change the CursorType property for the Recordset object to one of the following settings:
- adOpenDynamic
- adOpenForwardOnly
- adOpenStatic
- Change the CursorLocation property for the Recordset object to adUseClient.
- When the query of the Recordset object is connected to a pair of tables by using a left outer join, add a primary key to each of these tables in SQL Server 2005.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft SQL Server 2005 Service Pack 1.
For more information about the ADO
Recordset object, visit the following Microsoft Developer Network (MSDN) Web site:
For more information about the type of cursor that is used in a
Recordset object, visit the following MSDN Web site:
For more information about the location of the cursor service, visit the following MSDN Web site:
APPLIES TO
- Microsoft SQL Server 2005 Standard Edition
- Microsoft SQL Server 2005 Workgroup Edition
- Microsoft SQL Server 2005 Developer Edition
- Microsoft SQL Server 2005 Enterprise Edition
| kbsql2005sp1fix kbsql2005webdata kbbug kbsql2005presp1fix kbsql2005repl kbexpertiseadvanced kbtshoot KB914535 |
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