Multi-User problem

  • Thread starter Thread starter Alan Gillespie
  • Start date Start date
A

Alan Gillespie

I am working on a multiuser Db system... I am generating
my own record indexes (instead of using an Autonumber
field)... ok, so here is my problem: multiple user will be
using this system concurrently a problem occurs when one
user is adding a record and at the same time another user
is also adding a new record... this results in the
same 'unique' index being generated for both users. What
I would like to do is have the 'New' button in my form to
be disabled (for all other users) after one user has
started entering a new record and then have it enalbed
again after the record has been entered. Does anyone have
any suggestions on how to go about doing this?... any help
would be much appreciated!
 
Is there any reason why you can't use an autonumber? The only reason
I would go this way is if I needed to pull from a pre-defined list.
One thing you might try to do is insert a record into an autonumber
table and then grab that ID and use it as your index.

Otherwise you would need to lock your table while inserting the new
record. If you can only create a record in one place, this might be
feasible, since you could simply delay a 1/10 second if you detected
that the table was locked, then try again. It makes a bit more
complex load, but shouldn't be too bad.

I am working on a multiuser Db system... I am generating
my own record indexes (instead of using an Autonumber
field)... ok, so here is my problem: multiple user will be
using this system concurrently a problem occurs when one
user is adding a record and at the same time another user
is also adding a new record... this results in the
same 'unique' index being generated for both users. What
I would like to do is have the 'New' button in my form to
be disabled (for all other users) after one user has
started entering a new record and then have it enalbed
again after the record has been entered. Does anyone have
any suggestions on how to go about doing this?... any help
would be much appreciated!

..---
| Andrew Backer
| abacker _@_ comcast _dot_ net
`--------
 
Back
Top