Subject | Transactions - snapshot of data |
---|---|
Author | Robert martin |
Post date | 2006-05-03T02:25:35Z |
Hi
I have a readonly transaction (tiCommitted) where a query (TIBOQuery) is
run (left open) and then the underlying data is changed (additions and
deletions) in another transaction. The theory is that if I do a locate
in the Query and don't find the record I know it is an addition.
However this is not working, the Locate is always successful and it
feels like the query is refreshing itself with each call to locate
(records are added between locates). The Query always finds the record
and therefore doesn't identify additions.
Changing the transaction type to 'tiConcurrency' solves the problem. I
understand that tiConcurrency gives a snapshot of data at time the
transaction is started and that tiCommitted will show changes from other
transactions, however I thought that once a query was active, regardless
of transaction type the data returned remained constant until the query
was refreshed. Is that not the case or am I missing something?
Sorry about the long winded email to ask a fairly simple question :)
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
I have a readonly transaction (tiCommitted) where a query (TIBOQuery) is
run (left open) and then the underlying data is changed (additions and
deletions) in another transaction. The theory is that if I do a locate
in the Query and don't find the record I know it is an addition.
However this is not working, the Locate is always successful and it
feels like the query is refreshing itself with each call to locate
(records are added between locates). The Query always finds the record
and therefore doesn't identify additions.
Changing the transaction type to 'tiConcurrency' solves the problem. I
understand that tiConcurrency gives a snapshot of data at time the
transaction is started and that tiCommitted will show changes from other
transactions, however I thought that once a query was active, regardless
of transaction type the data returned remained constant until the query
was refreshed. Is that not the case or am I missing something?
Sorry about the long winded email to ask a fairly simple question :)
--
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd