This forum is deprecated.
FireDAC components in Delphi 10.4 no longer auto-refresh (commit) the transactions belonging to the same TFDConnection.
In Delphi 10.3.3 and earlier, it was possible to commit a TFDQuery transaction which was using a trUpdate transaction and this would automatically update/refresh all other transactions belonging to the same TFDConnection.
For example, when an Update query (using a trUpdate transaction) was committed in Delphi 10.3.3, the subsequent Select query using trSelect transaction would be automatically refreshed, allowing an immediate display of the Select query results, e.g. in the linked data grid.
In Delphi 10.4 this no longer works. It is now necessary to manually commit the Select query transaction after committing the update query transaction, otherwise it would only refresh all transactions when the application was closed and restarted.
This is a major breaking change in commit/refresh behaviour, which will require a massive re-programming effort to add the additional commit code in hundreds of places within the projects' code.
Is there a way to change this new transaction commit behaviour in Delphi 10.4, to match the old auto-commit method used in the previous versions of FireDAC/Delphi ?
I am using the Firebird 2.5 drivers provided by FireDAC. The TFDConnection has the fetch mode set to fmOnDemand and the refresh mode is set to rmManual. The posting update mode is set to upWhereKeyOnly. Using FireDAC = 27.0.0 (Build 99682). The project code is identical in both Delphi 10.3.3 and Delphi 10.4.
P.S. I have tried to add the default Transaction and UpdateTransaction entries to the TFDConnection, to use the TFDConnection.Commit command (instead of executing two separate commits for select Transaction and Update transaction), but unfortunately I am getting a FireDAC error "FB-343 Cannot set default transaction" when trying to commit the update transaction.
Any help how to resolve this major new FireDAC issue will be highly appreciated.
FireDAC's default isolation level of xiReadCommitted has been changed to xiUnspecified in the latest Delphi 10.4.
This undocumented change seriously affects FireBird and possibly other SQL databases, by completely destroying the stadard FireDAC transaction behaviour.
The temporary solution to this major issue is to change the isolation level back to xiReadCommitted in all FireDAC transcations.
The FireDAC default isolation level should be revereted back to the standard xiReadCommitted in the next Delphi 10.4 patch.
I am also having an issue with firedac post changes in Delphi 10.4. I am using TMS component livegrids and now they do not post correctly. These programs have worked in the past, but not now. I have found a workaround for me but it is not nice since there are several changes to be made.
Have you found an answer?
The answer what to do is above in my reply two months ago. Read it carefully. Also read the blog post by Marco Cantu:
Thanks however this still does not work for me. I am not sure why because everything works in 10.3.2 but fails in 10.4.
I am using firedac FDTable bind to tmsfmxlivegrid which the autopost is set to apnone and if I use FDTable.post in the PORLiveGrid2BCellEditDone event, when exiting the cell the new cell value is blank out. Like the FDTable is refreshed are something.
Thanks for any help?