• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

14. Programming DAO: Overview > 14.7. Closing DAO Objects

Closing DAO Objects

We should make a few remarks about closing DAO objects that have been opened programmatically. The Database, Recordset, and Workspace objects each have a Close method. This method will remove these objects from their respective collections. This is appropriate for the three object types mentioned previously for the following reasons:

  • The Databases collection is defined to be the collection of all open database objects.

  • The Recordset objects are temporary objects, to be used only for data-manipulation purposes.

  • Attempts to close the default Workspace object are ignored, but you can close other Workspace objects.

Note that objects of types other than the three mentioned are intended to be persistent members of their collections, stored on disk in the Access mdb file. However, they can be removed from their respective collections by using the Delete method.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint