CURRENT CLIENT_APPLNAME

The CURRENT CLIENT_APPLNAME special register specifies a VARCHAR(255) value that contains the value of the application name from the client information specified for Start of changethe current connection.End of change

The default value of this register is the empty string. The value of the application name can be changed through three interfaces.
  • The Set Client Information (SQLESETI) API can change the client special register.
  • In CLI, SQLSetConnectAttr() can be used to set the SQL_ATTR_INFO_APPLNAME connection attribute.
  • Start of changeIn ODBC, SQLSetConnectAttr() can be used to set the ODBC_ATTR_INFO_APPLNAME connection attribute.End of change
  • In JDBC, the setClientInfo connection method can be used to set the ApplicationName connection property.

Example

Select the departments that are allowed to use the application being used in this connection.

   SELECT  DEPT
   FROM DEPT_APPL_MAP
   WHERE APPL_NAME = CURRENT CLIENT_APPLNAME