Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compacting an Access DB
Message
De
17/09/2003 14:25:45
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Compacting an Access DB
Divers
Thread ID:
00830007
Message ID:
00830007
Vues:
54
I am using the following code to open an access database. I cant seem to close it with the .Close command, so that I can compact it before exiting the program. Any ideas?

Dim WithEvents adoLogRS As Recordset

Form Load
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\DIVERS LOG TABLES.mdb;"
Set adoLogRS = New Recordset
adoLogRS.Open "select * from tblLOG", db, adOpenStatic, adLockOptimistic


Form Unload
adoLogRS.Close
Set adoLogRS = Nothing
db.Close
Set db = Nothing


***then comes the compact db routine, but it always fails, saying, cannot perform operation, database is already open.
Répondre
Fil
Voir

Click here to load this message in the networking platform