Subject | Re: [IBO] How to get the record id that was just stored with a query |
---|---|
Author | Antti Kurenniemi |
Post date | 2005-07-01T08:21:54Z |
>>BeforePost for that query doesn't fire, what could be the reason for that?I'm using IB_Query. The data is stored when I call Execute in the code, but
>>Is it maybe because my Transaction component is set to autocommit, and so
>>in
>>my code I only call Query.Execute? The record is inserted and everything
>>otherwise seems to work ok.
>
> What statement class are you using?
the IB_Query component's BeforePost does not execute at any point. Strange.
I'll make a dummy app and play with this a little, to see if it's something
else in my project that's causing this.
> Use Autocommit only with great care. Be careful that you do not isolateYay, this is exactly where I'm going next - at this point I'm just taking
> your insert operation from other data that are going to use that stored
> value. If that operation is a piece of a broader task, then you should
> not
> be using Autocommit for the separate pieces of the task. The whole
> purpose
> of a transaction is to "throw a rope around" multiple operations, to keep
> the state of data consistent for each and every operation until the task
> is
> either completed (by committing) or backed out (by rolling back).
some shortcuts while learning, so autocommit is on to make things slightly
simpler.
Antti Kurenniemi