Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do something like RLOCK on SQL Server
Message
From
30/03/2006 08:31:10
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
MS SQL Server
Miscellaneous
Thread ID:
01108980
Message ID:
01109129
Views:
27
>No, it's just an issue of the app currently does not allow more than one user to edit the detail information for a header record and they want to retain that functionality.
>
>The example in question is for creating a flyer, leaflet, magazine, etc (which is the header) and then specifying all the geographic regions for distribution (detail).

How do multiple people end up working on the same flyer at the same time?

If you do use a flag, make it the user id. If a user "locks" the record, other users cannot get at it. If the same user's pc crashes and they go back to the record, allow them in.


>
>>>I am currently converting an app from Fox tables to a SQL Server back end. I've encountered a form that deals with a parent and child table and the code for editing tries to get an RLOCK() on the parent record. If successful, the edit of the child records is allowed, if not successful then the user is alerted that someone else is modifying the information.
>>>
>>>Is there a way (i.e. with some sql passthrough command) to lock a record in a table on the SQL Server back end?
>>
>>If this is some kind of invoice and the line item total is being written to the header, you could exclude the total from being updated when the header is changed and update the total as part of the transaction that saves the line items.
>>
>>The independent transactions won't conflict as the set of fields are different.
Previous
Reply
Map
View

Click here to load this message in the networking platform