Solved

Closing Access97  Tables

Posted on 1998-07-24
3
155 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 77
How to debug this code 7 56
Copy a row 12 57
Spell Check in VB6 13 96
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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now