Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS SQL AND LOCKING
Message
From
12/04/2000 22:33:14
 
 
To
12/04/2000 19:49:36
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00359040
Message ID:
00359084
Views:
12
>Hi everybody,
>
> I'm starting to migrate an aplication to client-server.
>
>The first question I have is about locking a record.
>I supose I'll have to make a stored procedure in SQL, and execute via sqlexec.
>
>What I wanna know if it's posible to do the folowing:
> One user locate a specified record , refresh the fields in the form and lock it so others user will not be able to modify the record.
>
>Can anyone sugest me a way of solving my problem.
>
>Thanks.

To the best of my knowledge this has to be a manual process. I worked at a client where they added a userlock character field and userdatetime datetime field to every table. The app was written to write the user name and a datetime stamp to the record being editted at the time the user began to edit a field of the record. If another use tried to edit this record, the datetime stamp was checked. the system had an autotimeout of 5 minutes (Configurable). If the lock expires, the second user could lock the record. Before the original user's changes were written back, the datetime stamp was checked. It checked if the original user had the lock still, if the lock expired but no one else locked the record and if the record was locked by another user. All business rules kind of stuff to handle expired data.

The datatime stamp was populated from the clock on the PC running SQL Server since the data couild be editted from anywhere in the world.

Hope this helps.
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Previous
Reply
Map
View

Click here to load this message in the networking platform