Re: determining transaction through 4gl
Posted in 1999
glynb@bicceri.demon.co.uk wrote: > > In article <775ees$d4q$1@news.xmission.com>, > Austin Castro <acastro@btl.net> wrote: > > > > Hi Guyz, > > Does anyone know if there's a way through 4gl to determine if a database > > has transaction loggin turned on. > > > > > austin castro > > > We have a standard piece of code at the start of each of our 4GL programs as > follows :- > > IF sqlca.sqlawarn[4] = "W" and > sqlca.sqlawarn[2] = "W" and > sqlca.sqlawarn[3] <> "W" then > LET P_logging = true > ELSE > LET P_logging = false > END IF Isn't checking sqlca.sqlwarn[2] enough? Also, make sure the check is done imediately after you connect to the database. > > ... where P_logging is defined as a smallint variable. > > Interrogation of P_logging thereafter yields the required result. The above > code is based upon (aging) Informix-4GL v4.10 but I believe will work with > versions beyond this. > > Kind regards > > Glyn Balmer > DBA > BICC Cables Limited > Erith Kent UK > "Nothing succeeds like a toothless budgerigar" > > -----------== Posted via Deja News, The Discussion Network ==---------- > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own -- ---------------------------------------------------------------------- John H. Frantz Power-4gl: Extending Informix-4gl john@rl.is http://www.rl.is/~john/pow4gl.html