0
votes

at the moment we are migrating the database component of our Delphi7 application from the BDE components to the AnyDAC (FireDAC) Version 8.0.5 components.

The following prerequisites are given:

  • On our form we have one TADConnection, one TADQuery and one TADTable. The TADQuery is the MasterSource for the TADTable. No special changes have been made to the settings of the AnyDAC components, so the AutoCommit mode is active.
  • Furhtermore we have one TDBMemo on our form which is linked to an ftMemo field of the TADTable (Firebird FieldType = Blob / Size = 240 / Subtype = Text)

During the loading of the blob text field content (TBlobField.GetAsString) the TADTable starts automatically an transaction which would not committed.

Is this behavior normal? Do we have any possiblity to avoid this open transaction? Please note, deactivating of the AutoCommit is no option at the moment.

Any help appreciated.

1
Yes, that is normal. So long you're not fetching BLOB data along with the detail tuple, AnyDAC (FireDAC) starts an implicit transaction. Think about it like every read or write from or to DBMS issues transaction.Victoria
@Victoria: It would be good if someone who knows what they are talking about (e.g. you) could edit the anydactag to mention that it is now FireDAC, since whatever version of Delphi introduced it..MartynA
@MartynA, it's already there "In 2013 AnyDAC was sold to Embarcadero, renamed FireDAC and limited to only support Delphi platform."Victoria
@Victoria: Oh, I missed that - I was only looking at the hover-over hint for the tag. Thanks.MartynA
@Victoria: thank you for your hint! That was exactly the reason for the automatically startet transaction! May I can ask you another question... Is there any possibilty to check what is part of an transaction? I mean can I check the prepared sql commands between starttransaction and commit / rollback?Mr.Darcy

1 Answers

1
votes

Yes, that is a normal behavior. So long you are not fetching BLOB data along with the detail tuple, AnyDAC starts an implicit transaction for fetching those BLOB data.