Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiuser Application problem
Message
From
16/06/1999 13:51:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Multiuser Application problem
Miscellaneous
Thread ID:
00230531
Message ID:
00230531
Views:
40
Hello Friends,

Please help me solve following situation in multiuser application.

I have a two date fields in one of my table in database.

Start date AND Stop Date.

Whenever I enter start date and stop date for new record. This start and stop should not overlap
with the dates of records which are already there in database.

for example, i have following entries in database.

start date stop date
06/14/99 06/20/99
06/22/99 06/25/99

now, for any new record , user can't enter start/stop date like 06/15/99 - 06/21/99 because it
overlaps the exsisting records.

That's why before saving any record, I check this validation by Select-sql on the database.This
works fine.

The problem is in multiuser situation. for example two users are entering new records at same time.
both have entered same start/stop date. let's say 06/27/99 - 06/30/99.

when User A goes to save this record, validation will check that is this range overlaps with any
previous records? He will not get any previous records with this range because User B has not
saved the changes yet. so He is allowed to save this record.

This is ok. but By the time User A gets the results of his query and he saves the record. User B saves the record.
so now, User A and User B both are allowed to save and database have duplicate entries.

I coudn't think what's the solution of this. I don't think I should user locking file mechanisam.

Please advise what's the solution of this situation.

Thanks in Advance

Thanks
Mark
Next
Reply
Map
View

Click here to load this message in the networking platform