Re: getting login name in 4GL
Posted in 1996
I side with the one who created a dummy table with one row only and used that. We allways need such a table with system releated information anyway so this is no problem. Ours isn't called dummy of course, and we store application version information, several codes used for different purposes and even the engine version, whether transactions are in use and other stuff here. Although the engine info can be gleaned from system information available when the database is opened, that may change. Any application can more easily read this from a table, and when using ODBC (and later possibly with Java) this info isn't as easily available without this table. Also I don't quite grasp Tim Schaefer's problem with trusting the user name returned from a select to the database. If that isn't correct than all my grants of access rights are in vain, aren't they? Or do I miss something here? Nils.Myklebust@ccmail.telemax.no NM Data AS, Postbox 9090, Gronland, 0133 Oslo, Norway My opinions are those of my company > tvarnas@compulink.gr (Apostolos Varnas) writes: > Dennis J Pimple wrote: > > > > > > Quibbling; > > I don't think there's any guarantee that tabid = 1 will alway be in the > > database (I vaguely recall that some sort of ALTER TABLE or UPDATE > > STATISTICS caused the tabid to be something else), so: > > > > SELECT USER INTO login_name FROM systables WHERE tabname = "systables" > > > > Might be better. > > Dennis, > > indepedent of this issue can you or someone else from Informix definitivily > clarify if there is ever a chance that a record with tabid=1 may not exist > in the systables table in any Informix Engine Version. > Vaguely statements can only cause confusion.