data loss and pessimistic lock in SDAC 6.7.13

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

data loss and pessimistic lock in SDAC 6.7.13

Post by LHSoft » Tue 21 May 2013 22:26

Hello,
I'm testing around Notifications.
I Open a TMSTable like follows:

Form.Create:

Code: Select all

TMSTable.SQL.Add('select Field1, Field2, ... from dbo.Tablename');
TMSTable.LockMode := lmPessimistic;
TMSTable.Options.ReflectChangeNotify := True;
TMSTable.ChangeNotification := TMSChangeNotification1;
Form.Show:

Code: Select all

TMSTable.Open;
Form.Close:

Code: Select all

TMSTable.Close;
I want to open lmPessimistic cause I want to lock record if it is in Edit Mode somewhere in Network.

Everything works fine, Notifications are sent and records are locked for other users when a user starts editing.

BUT:
I Edit the Fields by using TDBEdit and Navigaté by using a TDBGrid.
If a user starts editing a record and another wants to edit the Field "Name" of this locked record, the second user gets the correct Lock Message. But when the second user navigates to another record in the Grid, the Value of the first Name-TDBEdit appears in all Name-Fields of all records. When closing Form (which is closing the Table) and open Form again, the Name-Value is empty for all records. This only appears at the Field I wanted to edit first (in this example the Name-Field) before getting the Lock Message.
I have to restart application (restart Connection) in order to see Values in Name-Field again.

In Version 6.5 TMS writes:
•Bug with data loss in pessimistic lock mode is fixed.

Is this a similar problem or is something wrong with my code?

Best regards
Hans

AndreyZ

Re: data loss and pessimistic lock in SDAC 6.7.13

Post by AndreyZ » Wed 22 May 2013 11:17

I cannot reproduce this problem. Please try creating a small sample to demonstrate the problem and send it to andreyz*devart*com. Also, please specify the exact version of your IDE.

LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Re: data loss and pessimistic lock in SDAC 6.7.13

Post by LHSoft » Fri 24 May 2013 16:37

First finding is that only the TDBAdvEdit from TMS seems to be affected.
And I don't have been successful in reproduce in a fresh isolated project yet. So I continue adding all DBEvents.
Best regards

LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Re: data loss and pessimistic lock in SDAC 6.7.13

Post by LHSoft » Fri 24 May 2013 17:08

So, now I can reproduce it:

It does not depend on DB-Events but on TMS AdvOfficePager. If TDBAdvEdit is on TAdvOfficePage, this behavior occurs. If I use a TDBEdit instead, everything is fine too.

So I think it is not your SDAC but TMS.

Thanks for your patience.
Hans

AndreyZ

Re: data loss and pessimistic lock in SDAC 6.7.13

Post by AndreyZ » Mon 27 May 2013 07:25

Feel free to contact us if you have any further questions about SDAC.

LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Re: data loss and pessimistic lock in SDAC 6.7.13

Post by LHSoft » Thu 30 May 2013 23:44

actual information:

TMS is working on this problem

Hans

Post Reply