I am looking for a way in Microsoft Access to create a temporary table whose behaviour is similar to Oracle's in that its content is gone after the mdb is closed.
As far as I can tell, it's not possible, but I am open to be corrected on this.
Should it not be possible, I am still looking for a way to use temporary table but makes sure that the temporary table and/or its content does not clutter the mdb if (for example) the mdb is not closed correctly.
There are 2 types of Temporary Tables: Local Temporary Table, and Global Temporary Table.
In Oracle there isn't any difference. When you create a temporary table in an Oracle database, it is automatically global, and you are required to include the "Global" key word. The SQL standard, which defines how the term "GLOBAL TEMPORARY TABLE" is interpreted, allows for either a LOCAL or GLOBAL scope.
SQL Server provides two types of temporary tables according to their scope: Local Temporary Table. Global Temporary Table.
In Oracle a Global Temporary Table (GTT) is a permanent metadata object that holds rows in temporary segments on a transaction-specfic or session-specific basis. It is not considered normal to create and drop GTTs on the fly.
You will not be corrected, Microsoft Access does not directly support temporary tables. All tables created in the database must be explicitly dropped to remove them, and are visible to all users.
The "traditional" way to work around this is to use two Access databases, one with the shared data and a second, for which each user has a private copy, with user interface elements. The second database has the tables from the first one linked and any tables created in the second database are private to the user. In such a case (assuming you don't want to persist user-specific data) you can frequently empty the private database and compact it or even simply copy a new one off the network periodically (you need to do this to update the user interface when changes are made.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With