Subject Committing transactions for read only purpose
Author Marco Menardi
IBO 4.2i Native components
Hi, since FB uses transactions also for a simple select, I'm wondering
how can I keep transactions short in this scenario:
User fills some parameters and gets a dataset in the grid. He has only
to read those values, no editing or delete. They don't have to be
"consistent" from the beginning to the end, I mean, if data is
re-read, must reflect the most recent commits from other users, not
stay the same.
I've designed things as follow:
Transaction component with property ReadOnly = True
Query CommitAction = caInvalidateCursor, ReadOnly = Trie, RequestLive
= False
After user press "apply", I open or refresh the query with the new
parameters, and then commit the transaction. After the commit my grid
still displays the desired rows, wow, it works!
But the problems is when the user scrolls down, or changes row order,
since a new select is issued and I can't commit the related transaction.
Is this design wrong? What can I do to have transaction be committed
after the "select"? (autocommit does a commit-retaining, while I need
an "hard" commit). Suggestions?.
Thanks
Marco Menardi