Jump to content

Tommo_194

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by Tommo_194

  1. Hi, I have an issue with FireDac and Firebird DB, I spent some time tracking this issue down and found that if my select query returned greater or equal to the rowset size (default 50 in the firedac fetch options) (eg. select first 51) then a transaction would remain Active / uncommited, however if I select lower that the rowset size (eg. select first 49) the transaction will commit. We discovered while testing that we lost a large amount of data entry due to a crash (a separate issue), as it seems transactions were queued until the first transaction was committed or rolled back, no other transactions would be committed. Right now I have defaulted the fetch options - mode to fmAll, this gets all records and the select transaction commits this way. I know that will impact on performance but at least we get insert and updates committing as they happen now. Anyone come across this? I can't see the logic in this and wonder if its a bug.
  2. Tommo_194

    FireDac Uncommitted Transaction on Select Query

    Commit retaining on trace is false, it seems to be intended logic with Mode rmOnDemand, I can see that the cursor is not closed until there is nothing more to fetch. Just seems problematic not to commit and use a new transaction each fetch. So will just use rmAll option
  3. Tommo_194

    FireDac Uncommitted Transaction on Select Query

    Thanks for the reply, my TFDConnection (TxOptions) is set to AutoCommit=True AutoStart=True AutoStop=True DisconnectAction=xdCommit. If an initial select query is not performed (that returns record count over the rowset size) so no transactions are uncommitted at the time of performing updates or inserts, then all those Updates/inserts are committed and hit the database as they are executed. If however the first thing to happen is to open customer screen (has 125 records - fetch options rowset set to 50) the a transaction for that select query is left active (uncommitted) and then updates/inserts thereafter are not committed as they happen and the uncommitted customer query must first be committed to commit the updates/inserts. I know I could manually commit after doing the customer select query but it seems odd that I only would need to do this on tables with a record count over the rowset size, I also expected the AutoCommit setting to do this for me
×