Added support of automatic records locking
Now I'm using this code:
Code: Select all
procedure TDM.MyQuery1BeforeEdit(DataSet: TDataSet);
var MyQuery : TMyQuery;
begin
MyQuery := (DataSet as TMyQuery);
if not MyQuery.Connection.InTransaction then
MyQuery.Connection.StartTransaction;
MyQuery.Lock(lrImmediately);
end;