Subject | Re: [firebird-support] transaction the hundreth |
---|---|
Author | Thomas Steinmaurer |
Post date | 2011-06-10T06:38:09Z |
> Table A is the Idoc-TableNot the procedure commits the transaction, but the transaction initiator
>
> Table B the ORDER and Table C the ORDERPOS.
>
>
>
> One stored procedure do the following
>
>
>
> Insert a record in Table A
>
> Insert a record in Table B with reference from Table A
>
> Insert some records in Table C with reference from Table A and Table B
>
>
>
> I have learned, that stored procedures do all in one transaction.
>
>
>
> In Table A there is a trigger After Insert. The problem is, a new record was
> inserted in Table A, the Trigger runs - but at this time the stored
> procedure has inserted the records in Table B and Table C yet! Why? I think,
> a stored procedure inserts and commits all data at the same time in one
> transaction?
(client application) needs to commit/rollback the transaction.
> Currently I have solved the problem with a status-field. On Inserting inBasically, what problem do you have? Do you get an exception somewhere
> Table A I set this to 50 (parking) and after Insert in all other tables I
> update the status to 0 - and only at 0 the trigger runs.
>
>
>
> Is there a better solution for this?
etc ..., thus you have to build a workaround?
--
With regards,
Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/
Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!