Re: How to get username in SQL form.
Posted in 1995
In article <D3Gz8E.ME3@cix.compulink.co.uk>,
Andy Kent <akent@cix.compulink.co.uk> wrote:
>> Kevin Johnson (kj@ix.netcom.com) wrote:
>> : I'm using SQL 4.1. Does anyone know how to capture the
>> : user's name in a form?
>>
>> select user from systables
>> where 1 = 2>
>Yuk! Looks like the kind of nonsense Uniface would generate. Ugh!!
>Definitely a sequential scan job. Avoid!
>
>Not only that, I'm not sure it would actually return anything as the
>where clause would never be true...?
>
>Try:
>
>select user from systables
>where tabid=1>
>Quick, easy.
>
>akent@cix.compulink.co.uk (Andy Kent)
>-------------------------------------
I have been using the following select statement with success. It
was taken from an example in an Informix Manual.
select user
from informix.systables -- table guaranteed to exist
where tabname = "systables" -- row sure to exist and to be singular.
I use this in an esql-c function linked to the form specification file.
Mike Petersen mgp@nwedim.att.com AT&T Lisle, IL, USA
/********************************************************************/