I am working on a routine to Compact and Repair many databases that I will list in a table of a maintenance database. I am trying to figure out the easiest way to determine if a database is open.
One technique would be to compare a database file against its corresponding LDB locking file if its open. I would use Dir() function and parsing.
Lets say I have a database:
\\myserver\health\disease.mdb
then if it was open there would be
\\myserver\health\disease.ldb
How could I create a parsing statemnent to compare just the file name and disregard anything prior to the slashes and the extensions? I would be doing this with many different directories so the folders,slashes, and database name would change.
Is there an easier way from an external database to determine if a database is open?
One technique would be to compare a database file against its corresponding LDB locking file if its open. I would use Dir() function and parsing.
Lets say I have a database:
\\myserver\health\disease.mdb
then if it was open there would be
\\myserver\health\disease.ldb
How could I create a parsing statemnent to compare just the file name and disregard anything prior to the slashes and the extensions? I would be doing this with many different directories so the folders,slashes, and database name would change.
Is there an easier way from an external database to determine if a database is open?