Re: NewEra database update hassles
Posted in 1995
Kerry, For each INSERT, UPDATE, DELETE to be it's own transaction, place the transaction code in the following handlers: SQLDelete SQLInsert SQLUpdate or add the the ApplyAll button in the Event: activate variable ok boolean variable superTable ixSuperTable let superTable= (getVisualContainer() cast ixSuperTable) if superTable.apply() then call superTable.getConnection().transact(ixSQLConnect::SQL_Commit) else call superTable.getConnection().transact(ixSQLConnect::SQL_Rollback) end if I hope this give you an idea of what is going. What you were doing is starting a transaction but you were never committing it. So when you application closed the data base did a rollback. In version 1.1 it will treat each sql statment as it's own transaction so you don't have to do the commit or rollback. On Mon, 3 Apr 1995, Kerry Sainsbury wrote: > > Does this mean that everything I do within my NewEra program is uncommitted > until I leave it? Sounds like a good way to generate lots of locks :-) > > Does 1.1 do a commit each time I "Apply" my changes (like I expected 1.0 > to do) or is it follow the once-per-program model too? > > Regards, > Kerry S > --------------------------------------,------------------------------------- > Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ > Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/* > | mathcs.emory.edu:/pub/informix/faq/* > +64 9 377-4473 (work) 279-3571 (home) | http://www.garpac.com/informix.html > >