Microsoft Office 2000/Visual Basic Programmer's Guide |
Almost all database-transaction systems store intermediate changes in a temporary log file instead of writing them directly to the database. Microsoft Jet uses a similar mechanism in that it buffers all transaction activity to a temporary database. When the transaction is committed, the contents of the temporary database are merged into the real database. If you use the RollbackTrans method to cancel the transaction, the engine frees the pages in the temporary database.
The Jet database engine doesn't create the temporary database until it has to. It uses whatever cache memory is available to store changes to data. After the cache is exhausted, the engine creates the temporary database and starts to write changes there.
The Jet database engine creates the temporary database in the directory specified by the TEMP environment variable of the workstation. If the available disk space for the temporary database is exhausted during a transaction, a trappable run-time error occurs. If you attempt to commit the transaction after this error occurs, the engine will commit an indeterminate number of changes, possibly leaving the database in an inconsistent state. To ensure a consistent database state, you usually should roll back the transaction when this error occurs.
Although the temporary database is an Access database, it's used internally by the engine only. It can't be opened from other applications. After a transaction is complete, the engine frees the pages in the temporary database.