Re: Transaction support in informix dynamic server(IDS)
Posted in 2004
chaithra wrote: > i wanted to know, if in IDS we can get to know the status of a > transaction at any given time. or once any transaction commits or > rollsback we should be able to know the status. > is it possible through c++ interface provided by the IDS. I'm not quite sure what you're after. Are you trying to find out whether you have a transaction open on your current connection to the database? To do so, you attempt to start a transaction. If you get the error indicating that a transaction is already in progress, then a transaction was already running. If you get the error indicating that transactions are not available, you've got an unlogged database. If you get no error, you weren't in a transaction but you just started one; decide whether to roll it back or keep it open. When you do COMMIT or ROLLBACK, the status value returned from the command tells you whether it succeeded or not -- though, in all honesty, I've no idea what you'd do if a ROLLBACK failed. I would expect the C++ interface to permit all of the above. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/