The CURRENT CLIENT_PROGRAMID special register specifies
a VARCHAR(255) value that contains the value of the client program
ID from the client information specified for
the
current connection.
The default value of this register is the empty string.
The value of the client program ID 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_PROGRAMID
connection attribute.
In ODBC, SQLSetConnectAttr() can be used to set
the ODBC_ATTR_INFO_PROGRAMID connection attribute.
- In JDBC, the setClientInfo connection method can be used to set
the ClientProgramID connection property.
Example
Get the program ID being used for
this connection.
VALUES CURRENT CLIENT_PROGRAMID
INTO :PGM_ID