ACC97: Action Query Still Commits Changes to Data When CancelledLast reviewed: July 29, 1997Article ID: Q171851 |
The information in this article applies to:
SYMPTOMSNovice: Requires knowledge of the user interface on single-user computers. An action query always commits changes to data in a table. This occurs even if you click No when Microsoft Access prompts you to commit the changes.
CAUSEThe action query's UseTransaction property is set to No.
RESOLUTIONSet the UseTransaction property to Yes before running the action query.
STATUSThis behavior is by design.
MORE INFORMATIONThe UseTransaction property specifies whether an action query runs as a single transaction. When the UseTransaction property is set to Yes, the query results are stored in a cache or temporary database and are not written into the current database until you confirm that you want to commit the changes. When the UseTransaction property is set to No, the results are written immediately to the current database; the query runs much faster because it is not wrapped in a single transaction. However, you cannot cancel the changes that the query has made, even if you click No when prompted to commit the changes. If you create a query in the Microsoft Access user interface by opening a new query in Design view, the default value of the UseTransaction property is Yes. However, when you use data access objects (DAO) to create a QueryDef in Visual Basic for Applications code, the default value of the UseTransaction property is No. In the following example, the procedure CreateTransQuery creates an action query whose UseTransaction property is set to Yes:
Steps to Reproduce Behavior
REFERENCESFor more information about the UseTransaction property, search the Help Index for "UseTransaction property." Keywords : GnlMu QryAppnd QryDel QryMktbl QryUpdat EvnNtw kbusage Version : 97 Platform : WINDOWS Hardware : x86 Issue type : kbprb Solution Type : Info_Provided |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |