Connection to Access DataBase

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have one computer open a connection to an access database that's on a
network Drive, how can I determine from another computer if there is a
connection to that database open on the other computer? Would appreciate any
help.
 
Dennis,

This is an many times asked question. The answer is simple you cannot.

This should be implemented in the OS and that is not. As you probably know
has ms office its complete own implementation around that.

No answer however maybe it helps,

Cor
 
Dennis,
With Access if the database is open there is an ldb file of the same name as
the mdb file. The first connection creates this ldb file.
You could look to see if there is an ldb file present.
If there is no ldb then there is no connection.
The ldb is not always deleted when the connection is removed so you would
need to try and delete the ldb file. If there is still a connection, the ldb
file is locked and you will not be able to delete it.

If you can not delete it there is still a connection.

Doug
 
Dennis,

I gave the right answer on the wrong question.

My answer was on the question "Who has a connection open"

Dough gave a right answer.

Be aware that this is one of the terrible things of an Access database see
this.

Open connection.
Fill dataset.
Close connection
Somebody replaces the database
Open connection
Update database
.......

In fact do you all the time have to check if it exist.
(A real database server is only to manage by an admin).

Cor
 
¤ If I have one computer open a connection to an access database that's on a
¤ network Drive, how can I determine from another computer if there is a
¤ connection to that database open on the other computer? Would appreciate any
¤ help.

There is no built-in .NET method to do this. You need to use ADO:

How to determine who is logged on to a database by using Microsoft Jet UserRoster in Access 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q198755

For earlier versions of Access:

ACC: Microsoft Jet Utilities Available in Download Center
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q176670


Paul
~~~~
Microsoft MVP (Visual Basic)
 

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

Back
Top