Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!voder!pyramid!infmx!cortesi From: cortesi@informix.com (David Cortesi) Newsgroups: comp.databases Subject: Re: Transactions, logging, and Online Message-ID: <1990Nov12.175230.14710@informix.com> Date: 12 Nov 90 17:52:30 GMT References: <5394@qip.UUCP> Sender: news@informix.com (Usenet News) Distribution: usa Organization: Informix Software, Inc. Lines: 30 In article <5394@qip.UUCP> devin@qip.UUCP (Devin Wala) writes: > >We have run across an oddity in INFORMIX ONLINE. > >1) We create a database with logging turned on. So far so good. > [and can then LOAD, INSERT, DELETE and UPDATE w/o using BEGIN/COMMIT -- but cannot OPEN an update cursor w/o BEGIN] This is intentional. As it says on page 30 of the OnLine Programmer's Manual, "If you are not using a MODE ANSI database, and if you do not explicitly use [BEGIN and COMMIT] each SQL statement is an implicit, or singleton transaction. Successful singleton transactions are automatically committed. Unsuccessful SQL statements are automatically rolled back." The statements you report as working were all treated as singleton tranactions. When you put in explicit BEGIN, COMMIT and ROLLBACK statements, you can define the bounds of transactions. For example if you want a series of DELETEs treated as a single transaction to be committed or rolled back as a unit, you need to write BEGIN WORK ahead of the first and COMMIT after the last. Or if you prefer ANSI-compliant transaction management (explicit BEGIN WORK not required; explicit COMMIT WORK required to end any transaction) you can have that by setting up the database with LOG MODE ANSI. That is the meaning of the reference to MODE ANSI in the above quote.