How can I be sure that I have opened a BE .mdb in exlusive mode?

  • Thread starter Savvoulidis Iordanis
  • Start date
S

Savvoulidis Iordanis

I have developed a way to log user's apps, out of the BE file, for
maintenance.
Do I still need to open the BE in exlusive mode to make a backup using
CompactDatabase method?
I know that this must be done while out of the app, which has linked tables
to the BE, but still, how can I be sure that noone is logged again just
before I run that method?
 
6

'69 Camaro

Hi, Savvoulidis.
Do I still need to open the BE in exlusive mode to make a backup using
CompactDatabase method?

One needs only "exclusive access," not "exclusive mode" to compact a
database. However, since your database is in a multiuser environment, then
opening the database in "exclusive mode" is the recommended method to ensure
that the database will be able to compact successfully.
how can I be sure that noone is logged again just
before I run that method?

Don't worry. If you try to open a database in exclusive mode while someone
else has the database open, then you'll receive an error message and will be
prevented from opening it. Make sure that your procedure's error handler
accommodates this. If someone else tries to open the database after you've
opened it exclusively, then they'll receive an error message and won't be
able to interfere with your compaction.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
S

Savvoulidis Iordanis

Thanks.

But how can I open the BE file exclusively using another secure application
from the network?
(I mean an app that does not have any linked tables on the BE)
 
6

'69 Camaro

Hi, Savvoulidis.
But how can I open the BE file exclusively using another secure application
from the network?

Use the OpenDatabase( ) method of the Workspace object from the DAO library
to open the database remotely. You must specify the "exclusive" option when
opening the remote database. See Access Help for more information on this
method.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top