Subject | Re: [firebird-support] transactions in nested stored procedures |
---|---|
Author | Martijn Tonies |
Post date | 2003-12-12T12:54:43Z |
Hi Ulrich,
Transactions are controlled at the CLIENT side. So if you're
calling SP1 and SP2 from the _same_ transaction, both will
see the same data.
So if SP1 calls SP2, then SP1 should be able to read the data
that SP2 inserted. If not, you have another problem.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I have the following question(problem) :Yes.
>
> I created two stored procedures SP1 and SP2.
>
> SP1 calls SP2 to prepare (insert) some data in a table. After SP2
> finishes, SP1 tries to read the data out of the table which
> previously SP2 stored into it. At this moment the table seems to be
> still empty. Is it possible, that after finishing SP2 the insert
> operations in SP2 are not committed?
> If testing SP2 alone, the insert operations are working as expected...I bet IBExpert has some kind of commit/rollback afterwards.
>
> If a SP do commit data changes after finishes, then maybe the SP
> debugger in IBExpert isn't committing when I trace step by step
> through the SP.....?
Transactions are controlled at the CLIENT side. So if you're
calling SP1 and SP2 from the _same_ transaction, both will
see the same data.
So if SP1 calls SP2, then SP1 should be able to read the data
that SP2 inserted. If not, you have another problem.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com