Microsoft Knowledge Base Email Alertz

KBAlertz.com: (171178) - Records from a linked SQL Server table are sorted incorrectly in Microsoft Access datasheets and forms if the following conditions are true: A Microsoft Access user opens a long-running query or a form based on a long-running query. The query returns...

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 171178 - Last Review: January 20, 2007 - Revision: 3.1

ACC97: Wrong Sort Order in Large, Linked SQL Server Tables

This article was previously published under Q171178
Moderate: Requires basic macro, coding, and interoperability skills.

On This Page

SYMPTOMS

Records from a linked SQL Server table are sorted incorrectly in Microsoft Access datasheets and forms if the following conditions are true:
  • A Microsoft Access user opens a long-running query or a form based on a long-running query.
  • The query returns records ordered by one or more columns.
  • The Microsoft Access user and/or other users delete records to which the query conditions apply.
  • The records are deleted before the keyset of the query is completely built (the total number of records in the keyset is not yet displayed at the bottom of the query window).

CAUSE

This behavior is caused by a timing issue between SQL Server and Microsoft Access.

RESOLUTION

Although some of the records will appear out of sort order in the keyset, they are sorted correctly on the server.

MORE INFORMATION

The following procedure requires that you to have access to a SQL Server database containing over 100,000 records.

Steps to Reproduce Behavior


  1. Open a new database in Microsoft Access 97.
  2. Link to a SQL Server table that contains at least 100,000 records.
  3. Create a query based on the linked table and apply criteria that will reduce the recordset to approximately 25,000 records. Set the sort to Ascending for four of the columns in the query.
  4. Run the query.

    NOTE: It is important that the query runs for a long time before all the records are returned.
  5. While the query is still processing records, use the record number at the bottom of the query window to jump to record number 8040.

    NOTE: At this point the complete number of records being returned is not yet displayed. Background processing is still fetching records.
  6. Start deleting records, a few at a time.
  7. Scroll down a few times (usually 6 or 7 times) using the scroll bar of the query datasheet window.

    Within the records you will notice that some of the records are now out of order.

APPLIES TO
  • Microsoft Access 97 Standard Edition
  • Microsoft SQL Server 6.0 Standard Edition
  • Microsoft SQL Server 6.5 Standard Edition
Keywords: 
kbinterop kbprb KB171178
Retired KB ArticleRetired KB Content Disclaimer
This 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

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please