Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

who is connected to my db 5

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
access 97
vb6
ado 2.5

how can know if somebody is connected to a database.mdb?

i have 4 users with win95 conected point to point, that can access the database in sometimes or every time.

i need to compact my database, but only if nobody are accessing the database,,

it can be,
how

somebody can help me

thank´s for any help or sample
 
1. I want to be able loop through the subform to grab which records (ie key fields) are selected when there is MORE THAN ONE record selected. I know Access will allow this because you can select multiple records and then delete them manually, but I want to be able to program this to accomplish other things.




2. I have a course form which I need to add students to. I want to be able to bring up the add form and use the course number as the first field already filled in from the course form. Can I relate the student add form to the course form so it automatically adds the course field or do I have to manully program this?

Jason
 
Alejandr,

If someone has the database opened, then there will be a locking file (.ldb) of the same name present in the folder that houses your database. I.e. If your database is named database.mdb, then look for the file: database.ldb This tells you that someone has it open.

If you are just going to open the database and compact it without using code, simply look for this file before you open it. You may also want to open the database exclusively. If you are going to compact it through code only if no one else is using it, that is a different story.
-Chopper


 
yeeeesss.

this is my story:
"If you are going to compact it through code only if no one else is using it, that is a different story."


where is the database.ldb
 
Microsoft has a LDV Viewer utility that is a free download (translate to unsupported) that I use if I just want to see who is connected. The previous suggestion of check for the presence of the .ldb file is good as well. I would check to see if you can delete the .ldb file before you decide what you are going to do. The reason I say that is the .ldb will be left behind as an orphan if whoever had the db open had to close Access in a less than graceful manner (make than re-boot or network issues.). If someone has the mdb open then you will not be able to delete the .ldb file (easily).
 
You can also drop the ldb into notepad and it will list the users. Zorro
 
I have the Ldb viewer also, but I just tried Zorro's method - works fast, excellent tip!
-Smack
 
I'm flattered usually I am the one annoying everyone with questions its nice to have an answer for a change! Zorro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top