I'm using UniDac for years.
I consider changing IDE to VisualStudio C#. I would like to know how to implement in dotConnect Universal such code:
Code: Select all
// SQL_Query is the TUniQuery
JestTrans:=SQL_Query.Connection.InTransaction;
if not JestTrans then SQL_Query.Connection.StartTransaction;
try
SQL_Query.Lock;
try
SQL_Query.Edit;
// changing record fields ...
SQL_Query.Post;
if not JestTrans then SQL_Query.Connection.Commit;
except
SQL_Query.Cancel;
if not JestTrans then SQL_Query.Connection.Rollback;
msgBox('Problem with edition');
end;
except
if not JestTrans then SQL_Query.Connection.Rollback;
MsgBox('Record is edited by the other user');
end;
Michal