FFDTable.Transaction je aktívna
fdtrReadWriteTransaction
fdtrReadOnlyTransaction
.
if not FFDTable.UpdateTransaction.Active then
FFDTable.UpdateTransaction.StartTransaction;
.
FDataSource.DataSet.Insert;
// potom
class procedure TFDFunction.QryOpen(const Query: TFDQuery; FieldList: TList<TField>);
begin
if not Assigned(Query.Transaction) then
Query.Transaction := FbTransaction(ttReadOnly) // Vráti fdtrReadOnlyTransaction
else
if not Query.Transaction.Active then
Query.Transaction.StartTransaction; // Spustí
.
if Query.Active then
Query.Refresh
else
Query.Open; // Otvorí
.
Query.First;
end;
FDataSource.DataSet.State je teraz dsBrowse.
Nerozumiem prečo, keď používam rôzne transakcie. Čo zas neviem?