Re: HELP: Status of transaction in ESQL/C Online 4.1
Posted in 1994
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL
In article <1994Mar25.195835.2547@clsib21.clsi.us.geac.com>, jpt@clsib21.clsi.us.geac.com (Jean-Pierre Trevisani) writes: > >We use Informix ESQL/C Online 4.1 with straight C on Unix. > >Let's assume that in the middle of the application we do a BEGIN WORK >followed by a couple of DELETE's and INSERT's. The program gets a signal >before a COMMIT WORK or ROLLBACK WORK can be executed. The code must at >this point exit. > >Here's the question: >How can I find out whether I am in the middle of a transaction? I don't know about whether work is pending, but do a $BEGIN WORK and check the sqlca.sqlcode struct for error. If you need to commit partial txns, do a COMMIT and check error status. Otherwise you will have to maintain your own flags in code. Dave Otto -- dave@marvin.jta.edd.ca.gov -- daveotto@acm.org [all personal stats on file (most probably) w/NSA or BATF] GAT d++(-)@ -p+(---) c+++ l u++(-) e++/* m++(*) s-/+ !n h---(*) f+ g+++ w+ t++ r+ y++(*)