ODBC Driver System Functions

The table below lists the system functions included in the ODBC scalar function set that can be used with the BASIS ODBC Driver. Returned values are as ODBC data types.

Function

Description

DATABASE()

or DATABASE

Returns the name of the database corresponding to the connection handle (i.e., hdbc). The database name is also available by calling SQLGetConnectOption with SQL_CURRENT _QUALIFIER connection option.

USER()

or USER

Returns the user authorization name. The user authorization name is also available by SQLGetInfo by the information type: SQL_USER_NAME.

Example

Select Database(), User() from customer



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.