The information in this article applies to:
Advanced: Requires expert coding, interoperability, and multiuser skills. This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp). SYMPTOMSIf you use the CommitTrans or RollbackTrans methods directly with the CurrentProject.Connection object, you may receive one of the following errors:
-or-
CAUSEEach time the CurrentProject.Connection object is used, it has a different pointer to the connection. In effect, the instance or pointer to that object is temporary. This is why you see no error on CurrentProject.Connection.BeginTrans, but you do receive an error once you try to commit or rollback the transaction. RESOLUTIONMicrosoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools used to
create and debug procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspCAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database. Set an object variable once to CurrentProject.Connection and use it for your transaction processing, such as in the following example. Here, "c" is the Connection object used for transactions: NOTE: The sample code in this article uses Microsoft ActiveX Data Objects. For this code to run properly, you need to reference the Microsoft ActiveX Data Objects 2.1 Library.
Updated field to Drinks. Rolled back field to Beverages. MORE INFORMATIONSteps to Reproduce Behavior
Updated field to Drinks. Additional query words: prb
Keywords : |
Last Reviewed: July 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |