networked database, basic user login system

antonyx

Arsenal Supporter
Local time
Today, 21:12
Joined
Jan 7, 2005
Messages
556
hi..

i have a database stored on my main computer. all pcs on the network have windows xp.

the database is stored in a shared folder.. and at the moment.. everyone on the network can open the database.. but not at the same time..

basically if i have the database open.. my colleague on the pc next to me has to wait till i close it.

so what i am asking is can someone direct me to a simple tutorial or some reading material..
that introduces the methods needed to allow multiple pcs to access a single database with or without a login system.

i imagine there will be certain read/write and locking issues.. but i really need it.

thanks.
 
You really need a front-end/back-end system set up with each user having a copy of the front-end on their machine. Plus that way if someone opens in "exlusive" mode it won't affect you as they are only opening their front-end as exlusive and not the data file. It will also help prevent corruption of your data. As it stands now, if you get any network disconnection while a user is in the database you can pretty much kiss your data goodbye.
 
hmmm.. thats not good is it..

so are you saying that i would need to have the main db stored on a server..

and that when a client pc requests to open the database.. they can load a front-end version of the database.. and when they make changes.. those changes can be sent to the main db on their exit.
 
Yeah thats the basic idea. There are utilities you can make to copy the FE to users PC. I have an actually database file (.mdb) that will check a table in the backend for the newest version of the db and compare that value with the one stored on the users PC. If they are not the same th db will copy the newest version to the users PC.
 
this seems like it is going to be tricky..

i would prefer this situation..


MAIN PC
The database is stored on this pc in a shared folder. The database can be opened on this pc and edited freely.

SECOND PC
Network Places - MAIN PC - this pc can open the database through the networl and make changes freely.. If a record is already opened then msg box appears saying.. record is locked.. please wait.

THIRD PC
Network Places - MAIN PC - this pc can open the database through the network and make changes freely.. If a record is already opened then msg box appears saying.. record is locked.. please wait.

ahhhh.. i have just seen what you guys meant..

if the SECOND/THIRD pc is editing a record and the network fails.. then those changes disappear into thin air.. damn

ok.. well i think i will need to store the db on a server and load the front ends..

what if two people make changes at the same time to a record on their own loaded front end databases.. and they both exit at the same time..

how will the back end database on the server know which information is correct?

etc
 
The biggest issue with any multi-user Access setup is setting up sharing.

"Sharing" subdivides into "WINDOWS sharing" and "ACCESS sharing."

To resolve WINDOWS sharing, you need to declare a network share on the PC that is the host of the MDB file. Windows HELP or your site's network administrator can talk to you about this topic.

You need to pay attention to the SHARE's file-system permissions as well as the file's file-system permissions. This is because the SHARE and host permissions combine to represent the final permissions seen by a user. Among other things, your SHARE will have to pretty much allow FULL ACCESS because it doesn't have the granularity you really need. You will have to rely on the host's file-system permissions to do what little can be done to protect the files. Which ain't much, I assure you.

I strongly recommend that you allow access to either a specific user group or at least choose "Authenticated Users". Do NOT use the "Everyone" group. NEVER base a permission on EVERYONE - ever. See, EVERYONE includes anonymous users and system internal (userless) processes. Viruses fall into the latter category if you ever get successfully attacked by a driver virus. If Microsoft got rid of the EVERYONE category tomorrow, I wouldn't shed a tear even though I know why it exists.

NEVER use a DENY permission to protect your files unless that DENY is very specific. Always use the absence of an ALLOW where at all possible. I could explain that at greater length but it would take a lot of typing that isn't immediately relevant.

Always consider using GROUPS (Windows-style) to allow access to the file and folder. Remember that the folder needs lots of permissions. (See note below for supplemental information.)

OK, now you are ready to protect your file using ACCESS. ("Wait", you say... "what was all of that stuff in the prior paragraph?") Windows can only protect the .MDB file as a whole. But you still need to protect the contents of the file as identifiable entities. Only ACCESS can do this because only ACCESS understands the file internal structure.

I would also tell you how to do this but you did say you would take "reading material." OK, here's your reading assignment. SEARCH this forum for the topics "Workgroup Security" and "Securing a Database." Some of these articles will also enumerate the Windows file-system permissions you need and where you need them. (This is the "note" I mentioned earlier.)

Pay particular attention to articles that tell you how to make the database brain-dead with respect to the Admin account. It is usually the "Open Exclusive" permission of the Admin account that gets you into the situation you described. And it is the failure to properly manage & secure the workgroup that causes the Admin account to be the real troublemaker that it usually is.

This means you will need to consider two accounts in the database, one that will be your "new" admin equivalent and the other that is you when you are NOT doing admin work. And never the twain should meet.

Notice I didn't tell you that you couldn't host your database on your own machine. That isn't my call - and might not be your call either. It will be your network manager's call. If you use your own machine, though, just remember you have made it a target for others. Which is why you might run into a raft of problems with user security. I do not recommend using your own machine but it depends on availability of space on any network file server you might have. You and your network manager MUST get together to plan this activity.

If you use your assigned workstation as the host, this also means your computer cannot be shut down as long as even one user is in that database. Do you want to leave your machine running overnight if you have to leave before your last user does? If you turn off the machine while it is active, you will corrupt your database. Notice that I didn't place a conditional modifier on "corrupt" as a verb? "You WILL corrupt your database." Not MIGHT. Not COULD. WILL!!!!!

So walk into this problem with your eyes open. It is fraught with peril, with pitfalls in every direction. (And only a hobbyist writer like myself would even consider such a description as "fraught with peril." ;) )
 
You dont have to rewrite all your architecture to make a front-back end. Just migrate your tables to their own Access database and make links in your original database then distribute copies to each end users pc...
 
And just like KeithG, we needed to be able to automatically update the frontends on the users' machines since we have over 100 users and don't want to try to manually do it.

So, I created a tool that lets you add autoupdating to your frontends without having to do the coding yourself. All you have to do is change the version entry in two tables and the next time the user opens their frontend it will tell them that their frontend is out of date, close, delete the old, copy the new and reopen for them.

It is located here:
http://www.access-programmers.co.uk/forums/showthread.php?t=111132
 
So, I created a tool that lets you add autoupdating to your frontends without having to do the coding yourself

You make it too easy Bob!:D
 
You make it too easy Bob!:D

I HAD to for this one as it was for some people to use in one of our departments and they, at the time, didn't have any coding experience but had a lot of different frontends like that with many, many users.

Since I did that and we moved everyone off of one frontend on the server ( :eek: ) we haven't had a lick of corruption. Go figure ... :D
 

Users who are viewing this thread

Back
Top Bottom