Board index » delphi » Spurious nested transaction

Spurious nested transaction

I'm using D3-C/S and am currently trying to convert a very large and
complicated application to use cached updates. To update the database I'm
trying to use the ApplyUpdates method of TQuery components and am starting
the transaction explicitly. My code is nearly identical to the example in
the book.

My problem: On the call to the first TQuery.ApplyUpdates, I get a "nested
transaction" error. It would appear that the BDE is starting a transaction
on its own. Via the de{*word*81} I have verified that the query is hooked up to
the proper TDatabase and TSession. A look at the source code of TBDEDataSet
tells me that the TQuery itself is not going to start its own transaction
due to an ApplyUpdates call (I think!).

Does anybody know under what conditions the BDE will start a new transaction
from a call to ApplyUpdates?

Here are all the wrinkles I can think of in my situation:
1. The TDatabase and TSession components are off in a data module.
2. The updating code is in an abstract ancestor form (FormClose event) of a
non-modal form.
3. A list of TQuery controls is passed to my update code via a string list.
All these query controls share the same TDatabase and TSession (verified
with the de{*word*81}).
4. There are lots of queries (mostly non-Live) that are open but do not
participate in the update.

Any help would be greatly appreciated.

                         -- Ron

 

Re:Spurious nested transaction


Further to my previous post:

Hmmm, it appears that only one of the TQuery components is having this
trouble. I can't think of anything special about this query except that a
datasource is hooked up to it that services alot of TDBLookupCombos.

                -- Ron

Other Threads