Article ID: 104342
Article Last Modified on 3/10/2005
Function Description
--------------------------------------------------------------------
USER() Returns the user's authorization name. (The
user's authorization name is also available via
SQLGetInfo by specifying the information type
SQL_USER_NAME.)
DATABASE() Returns the name of the database corresponding
to the connection handle (hdbc). (The name of
the database is also available via SQLGetInfo
by specifying the information type
SQL_DATABASE_NAME.)
IFNULL(exp,value) If <exp> is null, <value> is returned. If <exp>
is not null, <exp> is returned. The possible
data type(s) of <value> must be compatible with
the data type of <exp>.
Following is an example of how the USER() function could be used from
within FoxPro to return the user's authorization name. This example assumes
that a valid connection to an ODBC data source has already been established
and that the connection handle is contained in the variable mhand:
result=DBEXEC(mhand, "SELECT {FN USER()}","output")
result=SQLEXEC(mhand, "SELECT { FN USER() }", "output")
Additional query words: FoxWin FoxDos VFoxWin CK 2.50 2.50a 2.50b 2.60 2.60a
Keywords: KB104342