ACC: How Microsoft Access Deletes Objects from a Database

Last reviewed: August 6, 1997
Article ID: Q90129
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SUMMARY

Novice: Requires knowledge of the user interface on single-user computers.

The following is a description of what happens internally in Microsoft Access when you delete an object (a table, a form, a query, and so on) from a database.

MORE INFORMATION

When you delete an object from the Database window, it is not physically deleted from the database at that moment. Instead, it is renamed to a temporary name (for example, ~TMPCLP1) and hidden, so that it disappears from the Database window. The renaming operation occurs very quickly, regardless of the object's size. The hidden object is physically deleted from the database as soon as you take any action other than the Undo Deletion action.

Microsoft Access deletes objects in this manner so that you can undo an accidental deletion, but only if you have not performed any other action that makes "undoing" an object deletion impossible. Microsoft Access can undo commands only one level back; it cannot queue up multiple commands to undo.

Because the physical deletion of the object occurs when you perform the next action rather then at the moment you choose the Delete command, your computer may appear to stop responding (hang) while it performs the delete operation. If the object is large enough, the deletion may take some time.

NOTE: If you restart your computer before the deletion is complete, the hidden temporary object remains in the database, wasting space. To remove hidden objects such as this, compact the database.

Speed of Deletion

The time it takes to delete an object depends on how large it is and how fast the computer is that you are using. Smaller objects are deleted faster than larger ones. If the database that contains the object to be deleted is on a network file server, the deletion will take longer.

How long an object deletion will take cannot be accurately predicted because the speed of deleting the object is also affected by the nature of the data contained in it. (For example, with tables, number columns are deleted more quickly than Memo and OLE columns.)

Internally, Microsoft Access does not provide a status callback for object deletion; therefore, a progress indicator in the status bar is not possible. Because there is no progress indicator, Microsoft Access does not yield to the system until the object deletion procedure is complete. Therefore, you cannot abort the operation or switch to another application while the object is being deleted.

REFERENCES

For more information about the Undo option, search on the word "undo" using the Microsoft Access Help Index, or ask the Microsoft Access 97 Office Assistant.


Additional query words: erasing
Keywords : GnlOthr kbusage
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : x86
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.