Reserved Records?!

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MYDAC100
Posts: 3
Joined: Fri 30 Mar 2018 20:01

Reserved Records?!

Post by MYDAC100 » Wed 03 Jun 2020 06:47

Hi everyone,

I'm using Delphi Tokyo 10.2 with MySQL Data Access Components (MyDAC) 10.2.4.
I have a Customers Table which is shared with 100 different users.

Each user must retrieve one customer record from this table and contact him/her. The problem sometimes different users contact the same customer at the same time.

I need the user when retrieving a customer and while this user showing this customer data, the other users can't access this customer record.




ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Reserved Records?!

Post by ViktorV » Thu 04 Jun 2020 14:45

The ability to lock a record for other users while a user views it is not supported by the database management system, this should be handled by the business logic of your application.
If you'd like to lock a record while some user is editing it, you can try using the TMyQuery.LockMode property. Please refer to MyDAC documentation for information on LockMode: https://www.devart.com/mydac/docs/devar ... ckmode.htm

Post Reply