Subject Re: [IBO] Return from SP always starts Transaction
Author Helen Borrie (TeamIBO)
At 03:03 AM 09-05-02 +0000, you wrote:
>Hello,
>
> (IBO4.2Gc, BCB4, FB-1.0-796)
>
> I have a very simple SP (TIB_StoredProc) and everytime I run it and
>check TransactionIsActive upon its return, it's always true.
> I have reduced the SP to a single line (I = 1;), and still the same
>problem.

It has nothing to do with the size of the SP. TransactionIsActive is still
true because the transaction is still active (pending). The transaction
will not end until you either commit it or roll it back.


> Can IBO determine if a SP has updated the database or does it
>always give the worst-case?

Yes, in the sense that, if you call Commit on the transaction and no errors
are returned, then the transaction succeeded and all work will be made
permanent. Until you do, you have an unresolved transaction. Other
transactions cannot see the effects of the work because it is still pending.

> I have changed StoredProcForSelect and StoredProcHasDML to no avail.

StoredProcForSelect tells IBO that you are expecting a dataset to be
returned. StoreProcHasDML says that the proc is going to perform an
insert, update or delete operation. But neither of them causes the
transaction to finish. Only Commit or Rollback can do that.


regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com