|
-
Jun 21st, 1999, 04:12 PM
#1
Thread Starter
New Member
Please do not send me to read help about CompactDatabase function. I did it many times. I have DB "MyDB.mdb" with Password "MyPassword" located on C:\. I'd like somebody give me exact code to compact MyDB from VB. And second question: how to find out if somebody is connected to that database through network before compacting.
Thank you.
Vlad
-
Jun 22nd, 1999, 12:28 AM
#2
Lively Member
I assume that you tried...
DBEngine.CompactDatabase "C:\MyDB.mdb","C:\MyNewDB.mdb",,";pwd=MyPassword"
and it didn't work?
If you attempt to do the compact, you should be able to trap the error that says someone is still in the database. Or you could look at the Users collection
for i = 0 to dbengine.workspaces(0).users.count -1
dbengine.Workspaces(0).Users(i).Name
next i
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|