Re: Informix Transaction in progress (E/SQL)
Posted in 1998
bruno statuto wrote: > > Hello, > > How can I know that I'm are currently in a transaction > in esql/c program (sqlca flags ?? this information seems not > to be in this structure. There is no way from within the program proper using the sqlca structure you must keep track of this yourself. If you execute a BEGIN WORK and have not COMMIT WORK or ROLLBACK WORK then you are in a transaction. Otherwise not, set a flag when you BEGIN and clear it when you COMMIT. You could query the sysmaster tables for your session id and get your session stats and there is a flag there that will tell you this but that is expensive and it is not easy to find out your own session id either. If you just want to know if the current database supports transactions, this can be determined fomr the sqlca.sqlwarn array immediately after the DATABASE statement or the CONNECT statement if the database name is included in the CONNECT. See the ESQL/C manual section on sqlca. Art S. Kagel BTW Flames are VERY rare here, welcome.