Re: ESQL/C transaction
Posted in 1993
>From: Bharat Shah <uunet!unifi!goofy.unifi.com!bharat> >Subject: ESQL/C transaction >Date: Mon, 26 Apr 93 9:26:33 EDT >X-Informix-List-Id: <list.2199> > >I have multiple libraries of ESQL-C functions. A lot of them call one >another. Some functions also have begin/rollback/commit transactions. >Problem I face is before starting transaction, how can I detect that a >transaction has already been started ?? Multiple "begin work"s obviously >(and correctly) are unsuccessful and return an error. You will have to use a set of functions called, perhaps, begin_work, commit_work, rollback_work, and in_transaction to handle transaction start and end. Maybe you also need a function cbegin_work to begin work if not already in transaction. If you use it, you need to be confident that you know when the transaction will be terminated -- cbegin_work should return a flag indicating whether it started a transaction, and if it did start it, the routine should also terminate the transaction. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>