Link to home
Start Free TrialLog in
Avatar of turki_00
turki_00

asked on

Kill user session

Hi,

Am developing an application using MS access 2003 SP2 that will be used on local network by many users.

I need to know if I can kill a session for such a user (kick him out) in case of DB maintenance.
Avatar of puppydogbuddy
puppydogbuddy

ASKER CERTIFIED SOLUTION
Avatar of Markus Fischer
Markus Fischer
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
From the Access Workbench:
Shutdown A Database and Send Messages to Users Running On Local PC's

In situations where a database is copied to a local PC, shutting down the database and sending messages to users becomes a little more complex because the standard Workbench software relies on the front-end database being shared by all the users.  To get around this complication, you need the Shutdown and Message code that you add to you front end local database to look for a file on the server. The best way to do this is to look for a file associated with the backend version of your database. The same approach can be used when using multiple front-ends to link to one backend database.

So open the shutdown form in your database and find (and change) this line of code in the CheckForMessage subroutine

dbShutdownFilePath = Left(CurrentDb.Name, Len(CurrentDb.Name) - 4) & WBENCHSDFTYPE

to either

Dim BackendPath as string
backendPath = "\\Server\folder\backendData.mdb”
dbShutdownFilePath = Left(backendPath, Len(backendPath) - 4) & WBENCHSDFTYPE
Avatar of turki_00

ASKER

Thank you harfang

for leading my to the solution.

Just set a hidden form with a timer and do the job.