Page 1 of 1

data loss and pessimistic lock in SDAC 6.7.13

Posted: Tue 21 May 2013 22:26
by LHSoft
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

Re: data loss and pessimistic lock in SDAC 6.7.13

Posted: Wed 22 May 2013 11:17
by AndreyZ
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.

Re: data loss and pessimistic lock in SDAC 6.7.13

Posted: Fri 24 May 2013 16:37
by LHSoft
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

Re: data loss and pessimistic lock in SDAC 6.7.13

Posted: Fri 24 May 2013 17:08
by LHSoft
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

Re: data loss and pessimistic lock in SDAC 6.7.13

Posted: Mon 27 May 2013 07:25
by AndreyZ
Feel free to contact us if you have any further questions about SDAC.

Re: data loss and pessimistic lock in SDAC 6.7.13

Posted: Thu 30 May 2013 23:44
by LHSoft
actual information:

TMS is working on this problem

Hans