Microsoft KB Archive/275115

= ACC2002: View or Function Including TOP X or TOP X PERCENT Cannot Be Updated =

Article ID: 275115

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q275115



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access project (.adp).



SYMPTOMS
When you create a TOP X or TOP X PERCENT view or function in a Microsoft Access project, the view cannot be updated as expected. The object can be updated only when you specify TOP 100 PERCENT.



CAUSE
This behavior occurs as a result of a unique rows limitation, caused by the ADO UniqueRows property for the recordset being set to False. As a result, Microsoft SQL Server does not return the unique row information required to enable updating.



RESOLUTION
To work around this issue, specify TOP 100 PERCENT instead of TOP X or TOP X PERCENT.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Problem
 Open the sample project NorthwindCS.adp. In the Database window, click Queries, and then click New. Select Design View and click OK. Close the Add Table window; on the View menu, point to Show Panes, and then click SQL.  In the SQL pane, type the following code: SELECT TOP 10 dbo.Products.* FROM dbo.Products; </li> Save the view as TestView, and then run the view. Note that the view is read-only.</li></ol>

<div class="references_section">