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;
Code: Select all
TMSTable.Open;
Code: Select all
TMSTable.Close;
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