Solved

Closing Access97  Tables

Posted on 1998-07-24
3
158 Views
Last Modified: 2010-05-03
When you exit a complied VB5 app does VB automatically close the DB and all of its open tables and recordsets? It is my understanding that everything is closed and cleaned-up automatically. If this is not true what is the safest method to close an app that uses several Access97 databases?
Thanks
0
Comment
Question by:Ddan
  • 2
3 Comments
 
LVL 1

Expert Comment

by:web_crusher
ID: 1466636
Vb5 do closes all db at the end but you never know where
the next microsoft bug will occur - i always close my db with several metodes like : data1.Recordset.Close
and data1.refresh

try looking in recordset help - there are several ways - and they all good for multi database operations

Do not Plan on depending on other application to close your db
remmember - a db is very important to a program and system
handle it yourself !!
0
 
LVL 1

Expert Comment

by:web_crusher
ID: 1466637
after rejection a comment of yours should be added!
0
 
LVL 2

Accepted Solution

by:
dabellei earned 100 total points
ID: 1466638
Exiting the application close all database.  But it is always a good idea to close database before exiting a program.

dim db as database
set db = opendatabase("....")


close.db


Don'T forget you have to close all object before closing the database, like recordset.

Hope this help
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question