Re: What is the best way to handle client/server envirnment for ten or more computers in a network using it constantly.. Like Supermarket..
Hi,
Are you using Access as a front end? It sounds like you already have the
front end split from the back end.
Make sure all of the users are opening the database in a shared mode. The
problem with using forms and a query in the record source is the constant
connection maintained between the user and the backend. If you use a
listbox, you may have more contention for resources. I've read about and
then proved that problems start with 12 - 15 users and by the time you get
to 30 you will have a corrupted database.
Some of the systems I've built have as many as 200 users accessing the
database during a fifteen minute period. The users are writing between 7 and
12 transactions per second. Incidentally this is on an NT machine with 550
mhz single processor and two scsi hard drives.
One of the methods I use is by using unbound controls. The program on the
user's machine connects to the server through ado code. An sql statement
gets the info. The user program disconnects from the database. The user
views or changes the data. A connection is re-established with the database
on the server. The updates/inserts are done via sql code. Then we
disconnect from the database.
The Access help screens can show how this is all done. Briefly what I do is
set up a module with several functions that do all the work:
Create the following functions:
ConnectMDB (inDatabase as string)
GetRS(inSql as string) as adodb.recordset
In the form call the two functions, set your textbox's to the values from
the recordset. For the occasional locking situation this system encounters,
I employ the trappable errors that are mentioned by Michel Walsh. Quite
often all that is needed is to have your program pause for a second then try
again to update. Try to update every two seconds for ? many times.
If you are writing new records (inserts) then locking shouldn't be an issue.
Anyways I could type here for an hour an not cover all the various scenarios
that can be encountered.
There are many good books out there. Also I use the same techniques with VB
6.0 and Access, VB 6.0 and Oracle....
Good luck...
"Michel Walsh" <vanderghast@VirusAreFunnierThanSpam> wrote in message
news:%23fZiZZosDHA.2440@TK2MSFTNGP12.phx.gbl...
> Hi,
>
>
> XP is 2000 with some minor improvements.
>
> If you write to the database (JET or MS SQL Server) in a multiple
> users environment, you may specify which type of record locking
(optimistic
> or pessimistic) you want in order to avoid incoherence when the two users
> write more or less at the same time on the same record of the same table.
> You get run-time trappable error (through an Access Form OnError event, or
> through the standard on error handling if you are outside an Access Form)
> and there, you can resubmit the "operation", as it fit your need, or
cancel
> it (if that is how it should be done).
>
>
> Hoping it may help,
> Vanderghast, Access MVP
>
>
> "Victor Cheung" <victorcheung01@rogers.com> wrote in message
> news:hS%vb.2256$Fv8.150@twister01.bloor.is.net.cable.rogers.com...
> > I developed the software with microsoft access.. and windows XP.. but..
> > Windows XP give me hell... so.. probably use Windows 2000 Professional..
> > which I think is a better OS.. i guess.. my question is how can i
avoid..
> > the problem when two workstation is try to write to a database file.. I
> > mean.. it is okie.. to read .. from a database.. but.. any error
tracking
> > method.. or code.. that can find out the file is used by another
machine..
> > and automatically wait until the file is free.. and than write to the
> > database.. instead of giving me error.. when another computer is writing
> > data to the database.. etc.. thankz..
> >
> >
>
>
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735