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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimizing the Number of Connections Made from Each Client

Status
Not open for further replies.

Robotron

Programmer
Mar 16, 2004
72
US
I was reading on Microsoft's support site that one of the ways to minimize corruption in an Access database is to minimize the number of connections made from a single client to the backend database. I am not totally certain about how to accomplish this.

My first thought is this.
Set up the connection globally and refer to it anytime I need to have a recordset in a form. I think that this would need to be done in a module and autoexecuted with the loading of the first form that opens.

Can anyone confirm or offer a better way of utilizing only 1 ADO connection throughout an Access front end.

Thanks.

Phil Edwards
 
you could create a module that returns the current users windows logon. (do a search for info on how)

then when your main form opens apend a record to a table called current users or something along with a date/time etc.

then when the users closes the database have a delete query remove any records whereby the current user = user field in "current users" table


Now back to the main form of your database and if theres an entry in the current users table that matches the result of your module then kick up a form telling the user that they already have an instance open etc etc

hope that points you in one possible direction


another advantage of this is it would show you a list of who is logged onto the database and since when have they been logged on + any other details you specify.

eg you could hardcode front end version details and have that show too, so you keep a track of whos front end needs updating/whether they are running the admin client/user client etc etc etc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top