Ok I deleted my previous post as I narrowed this down a bit.
Bit of a weird scenario but bear with me.
Basically, I have a table with some business rules, which are implemented via a class derived from TDABusinessProcessorRules.
In this class, I’m overriding BeforeProcessChange to perform some validation. Crucially, part of this involves executing a command.
This is done by creating a TDALocalCommand object and calling the Execute method. This TDALocalCommand object has its ServiceInstance set to Sender.Service, i.e. the Service property of the Sender parameter which is the TDABusinessProcessor object. Basically creating a new TDALocalCommand object but within the context of the existing service instance.
This actually works fine but, for some reason I can’t fathom, the Execute method is committing the currently running transaction.
What’s going on here? I want the command to execute within the context of the currently running transaction (it’s only reading data, not actually modifying anything).
Is there something I’m not doing or another way of achieving this?