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

Security .MDW update question

Status
Not open for further replies.

LittleSmudge

Programmer
Mar 18, 2002
2,848
GB
I have a series of MSAccess Front End applications that are distributed across 6 sites over a WAN ( VPN ) ( Front up for a MySQL dataengine )

To speed up logging on to the MSAccess databases I have distributed the .MDW file to each of the local servers and the users then open their Access front end dbs using their local .MDW

The central master .MDW file is updated with new users and old ones removed at the corporate headquarters and then distributed to all sites along with new FE design changes overnight on a scheduled copy process.

I now want each user to be able to change their own password when they want to.
I can easily change the password held in the local copy of the .MDW because that is just a
Code:
DBEngine(0).Users(txtCurrentUser).NewPassword Nz(txtOldPass, ""), txtNewPass

HOWEVER, how can I write the change to the central .MDW so that the local changes do not get overwritten during the next nightly copy process ?



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
I don't believe there is any way to do what you want unless your users can also access the central mdw and that gets chnaged in code along with their own copy ( but the error handling would be horrible).

Why do existing users need an updated copy of the mdw?
 
The Security.MDW file is about 400Kb in size and I put a copy on each local server because when I held one copy on the central server and all users accessed it remotely it was taking a significant time to ship the entire .MDW file to each user every time they logged on to a database.

Having the .MDW local makes logging on much quicker.

When a new person joins at one of the local offices then HQ needs to add them to the .MDW and it then gets distributed.

This also means that 'Fred' can visit any of the sites and still log on to the databases. He is not restricted to his local office.


I'm quite expecting a big lump of code to do this job lupins.
I was wondering if there was some way of using something like
DBEngine("\\server\path\Security.mdw")
to gain access to the .MDW held centrally.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
I don't get it. If everyone has access to the central server, why ship the .mdw file to each user. Why not just have the shortcut reference the .mdw file on the central server. Something like this:

"\\path\access.exe" "\\path\YourFE.mdb" "\\pathToCentralServer\YourWorkgroup.mdw
 
LittleSmudge,

open a connection to the database using the central master .MDW file and change there their password also
Use this for local server

DBEngine(0).Users(txtCurrentUser).NewPassword Nz(txtOldPass, ""), txtNewPass

and then this for central( open a new connection NewCnn)

NewCnn.Execute "ALTER USER " & txtCurrentUser & " PASSWORD " & Nz(txtOldPass, "") &", " & txtNewPass

and then close that NewCnn
 
FancyPrairie
well yes - that's exactly what I started with, but the task of going to the central server and getting the .MDW file ( and Access being File Server ships the entire file to the calling machine EVERY time it is accessed ) produces an significant, and unaccepted by the users, delay in the logon process. So I ship the .MDW to the local server and it only has to travel across the LAN on each log on which is much faster than traveling over the WAN.

JerryKlmns
That looks very promising - I'm off to give that a try.


Regards all.


G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
LittleSmudge, I must be overlooking something you are doing. I have about a dozen systems I've put together that all access the .mdw file on the server. And Access does not attempt to copy the mdw file to the machines.

Maybe the reason Access is copying the file from the server to the users' machines is because the name of the mdw file on the server is System.mdw (which is Access' default mdw file). If so, then rename the .mdw file on the server to something else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top