USERID function

Returns a character string representing the user ID for the specified database connection identity.

Syntax

USERID [ ( logical-dbname ) ]
logical-dbname

The logical name of the database from whose connection identity you want to retrieve the user ID. The logical database name must be a character string enclosed in quotes, or a character expression. If you do not specify this argument, the compiler inserts the name of the database that is connected when the procedure is compiled. If you omit this argument and more than one database is connected, ABL raises an error.

Example

This one-line procedure displays the current user ID for the database with the DICTDB alias:

r-userid.p

DISPLAY USERID("DICTDB") LABEL "You are logged in as" WITH SIDE-LABELS.

Notes

See also

CAN-DO function, CONNECT statement, QUALIFIED-USER-ID attribute, SET-CLIENT( ) method, SET-DB-CLIENT function, SETUSERID function, USER-ID attribute