RE: forget commit work.
Posted in 2001
Topics: General Discussion
If your appllication has 'exited' and no longer is connected to the database, then it's not your application that has the lock. cheers j. > -----Original Message----- > From: tony@telekbird.com.cn [mailto:tony@telekbird.com.cn] > Sent: Tuesday, January 16, 2001 12:09 AM > To: informix-list@iiug.org > Subject: forget commit work. > > > I forget a statement "EXEC SQL COMMIT WORK" before exit my > application. > When I query record from table,it says the record is locked. > How should I do now? > Thanks a lot. > > > Sent via Deja.com > http://www.deja.com/ >
"Parker, Jack" wrote: > If your appllication has 'exited' and no longer is connected to the > database, then it's not your application that has the lock. Provided, of course, that the server has recognized that the application has exited, which may take a little while (order of 10s of seconds). > > From: tony@telekbird.com.cn [mailto:tony@telekbird.com.cn] > > Sent: Tuesday, January 16, 2001 12:09 AM > > > > I forget a statement "EXEC SQL COMMIT WORK" before exit my > > application. > > When I query record from table,it says the record is locked. > > How should I do now? Fix the application so that your changes are not rolled back when you disconnect! AFAIK, the Orable databases implicitly commit when you disconnect, which is obnoxious. Informix databases implicitly rollback when you disconnect, which is much more sane. Think about it; if you suffer a core dump part way through a TX, Orable commits what you've done on the assumption it was all you intended to do; yuck! -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"
> From: Jonathan Leffler <jleffler@informix.com> > Organization: Informix Software Inc > Newsgroups: comp.databases.informix > Date: Tue, 16 Jan 2001 20:37:09 GMT > Subject: Re: forget commit work. > <Snip> > AFAIK, the Orable databases implicitly commit when you > disconnect, which is obnoxious. Informix databases implicitly rollback > when you disconnect, which is much more sane. Think about it; if you > suffer a core dump part way through a TX, Orable commits what you've > done on the assumption it was all you intended to do; yuck! Not true. Of course Oracle rolls back the transaction if a session is disconnected abnormally. I think you are confusing yourself with a capability in some Oracle tools (particulary SQLPLus) that will automatically commit transactions if a session is explicitly quit by the user - the commands EXIT and QUIT imply a commit point by default.