Networked Database Problems

Bert666

Registered User.
Local time
Today, 13:07
Joined
Jan 9, 2003
Messages
34
Hi there people,
I am working on a database that will be running on a network - Anyway i have split the db - Everything i running just fine, so we decided to test the validation on the forms - (By the way i am using ADO). If there is an interval between the users making an entry into the same table it works just fine - but when tested by say 2 users clicking save at the same time neither form validates the data and duplicate entries can be made. Here is how i am Validating at form level:
Button Click (CMDSAVE)
Requery recordset 'to get the latest records
if recordcount > 0 then move to first record
loop thru the records and compare with the record to be added
if match found exit sub and msgbox error
else
add the record
Any Thoughts??
Bert
 
When you loop through the recordset to find potential matches, that implies that you have opened the recordset. Did you open it with the SeeChanges option? Or does that not apply to the way in which you opened the DB?

I would look carefully at the recordset's locking characteristics and the form's locking characteristics.
 
Is this an issue (clicking at the same time) with all databases?

What about if two new entries are made at the same time and there is an autonumber for something like CustomerID - will there be issues giving each thing a number?

My DB will be split into FE and BE and will be used by 5-8 people - what problems can i expect to encounter?
 
Networked Db Problems

Thanks for your replies,

Yes i have opened the recordeset as dynamic - the actual problem is in the validation - see the example below:


two frontends open on 2 computers.
now the form validation goes like this:

Button Click (CMDSAVE)
Requery recordset ' to get the latest records
if recordcount > 0 then move to first record
loop thru the records and compare with the record to be added
if match found exit sub and msgbox error
else
add the record

but notice that when clicked at the same time both the forms run the procedure at the same time - so neither will see a duplicate record since neither has added the new record until the end of the procedure-

my question is - Is there anyway around this - an alternative way.

Bert.
 

Users who are viewing this thread

Back
Top Bottom