on 05-29-2015 8:22 AM
Hi,
is there any chance to get that pessimistic locking working with firedac? If not has someone created a way of locking mechanism to lock i.e. the current edited dataset-row so other users can't edit same record at the same time with firedac and ads?
I will preface this by saying I've never used Firedac. This may be a better question to ask of the FireDac community.
Reading through the Embarcadero help file, it looks like everything in FireDac is done via SQL. (it even appears that TFDTable converts the tablename into a simple SELECT statement)
There is not a way to really get Pessimistic locking with ADS and SQL.
One possible option is to begin a transaction, update the record (i.e. add a field "locked")
Select the record for the user to Edit
Issue another update once the user is done editing
Finally Commit the Transaction.
While the Transaction is open and once the record is first updated it will be locked until commited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.