Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Jul 2, 1999

Find Out Who is Connected to an Access Database

If you're creating a Jet-based multiuser database system, you'll sometimes need to know who is currently connected to the shared database. To get this information in situations where you don't want to integrate a full Access security system, you have two choices. First, you can code in your own "connected users" table and require users to log on with a simple form on startup. Second, and better, you can use the simple msldbusr.dll. This is probably the best "power toy" ever created for multiuser Jet developers. It tells you the computer names connected by accessing the LDB of the database file. You can rename the MDB with any extension, but the LDB is what counts and it works fine.

Once you get the data from the DLL, you can integrate it with Mauro Mariz's tip, "Send Messages to WinPopUp from Your Application" [101 Tech Tips for VB Developers, Supplement to the February 1998 issue of VBPJ, page 18] to tell the remote user to finish up and shut down the remote app so you can perform maintenance with an exclusive connection.

If you want to integrate your own security system based on connected users without forcing manual logons, you can let the remote apps connect, then run the connections against a list of allowed computer names and take action before allowing them full access. Although this DLL is listed as "currently unsupported," it does only what it's supposed to. You can get it, along with a few other Jet locking utilities, at

http://support.microsoft.com/support/kb/articles/q176/6/70.asp
Robert Smith
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date