How to lock a record?


Author
Message
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
I have the need to update a field "InStockQty" with an accumulated value of "InStockQty + 100" or some other value. In VFP I used "RLOCK" to lock the record and make sure my update is done before allowing somebody else to update this field, now how can I do the same with SF/.NET/MS-SQL?


Edhy Rijo

Replies
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Edhy.

I realise this is a fairly old thread , but I have a similar issue now and want to 'Lock' a record for similar Stock type update.

Just wondering if you would care to share what you did in the end here ?
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Gerard,
In this particular case I decided to use a BO.CustomFieldProperty (CFP) to show this value and calculate it on the fly with a stored procedure (SP).

Since through a Business Binding Source (BBS) you can read a BO in a report, it works just fine as long as the SP is optimized.  For other cases I simply use a BO transaction to save the data, not sure it will work as the VFP RLOCK.

Make sure you check out article links posted by Trent here since they are very interesting.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search