Re: Informix Transaction in progress (E/SQL)
Posted in 1998
In article <3650B663.77FA@bloomberg.net>, Art S. Kagel <kagel@bloomberg.net> writes >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. Well I need something to keep me warm on these cold night (Dave whose car would not start and spend 3/4 hours walking to the station and 3/4 walking back today..) PS The FAQ is below!! -- David Williams Maintainer of the Informix FAQ Primary site (Beta Version) http://www.smooth1.demon.co.uk Official site http://www.iiug.org/techinfo/faq/faq_top.html I see you standin', Standin' on your own, It's such a lonely place for you, For you to be If you need a shoulder, Or if you need a friend, I'll be here standing, Until the bitter end... So don't chastise me Or think I, I mean you harm... All I ever wanted Was for you To know that I care