Avatar of hidrau
hidrau
Flag for Brazil asked on

Is there any way to treat Lock record in table with clientdataset?

Hello guys

I have a table and two users request the record at the same time.

When the first user gets the record, the second should must get a message about the record is locked.

How should I do that with clientdataset?

thanks
Alex
Delphi

Avatar of undefined
Last Comment
hidrau

8/22/2022 - Mon
Sinisa Vuk

This is more complex than you think. Please look at Optimistic concurrency control idea... Probably, you need additional field in a table... With Lock function set some value if empty (like username) and on Unlock - clear field... Assess row if username is equal...
ASKER CERTIFIED SOLUTION
Geert G

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
hidrau

ASKER
Thanks a lot
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy