> # Specifying Application IDs

> Application IDs are alphanumeric strings passed by a SequeLink Client that identify the client application to a SequeLink service that has been configured to accept connections only from specific application IDs.

> For more information about configuring SequeLink services to accept connections only from specific application IDs, refer to the SequeLink Administrator's Guide.

> ### Specifying Application IDs Explicitly

> ODBC client applications can identify themselves explicitly to the SequeLink service in any of the following ways:

> - Specifying the application ID in the ODBC connection string that is passed to SQLDriverConnect. For example:

> ....;APPID=MyAppID;

> or

> ....;ApplicationID=`MyAppID`;

> where `MyAppID` is the application ID.

> - Specifying the application ID using SQLSetConnectAttr. Immediately after each call to SQLConnect or SQLDriverConnect connecting to the ODBC Client, call SQLSetConnectAttr as shown:

> SQLSetConnectAttr(hdbc, 1053, "`myAppId`", SQL_NTS)

> where `myAppId` is the application ID.

> The SQLSetConnectAttr is defined in sql.h. If an incorrect application ID is specified, the SQLSetConnectAttr fails and all subsequent SQL statements fail.

> ### Generating Application IDs Automatically

> ODBC client applications can turn on automatic application ID generation in any of the following ways:

> - Specifying the automatic application ID method in the ODBC connection string that is passed to SQLDriverConnect. For example:

> ....;AutomaticApplicationID=`x`;

> where `x` is set to one of the following values:

> - When set to 1, the full path of the application executable is used as input for the hash function.
> - When set to 2, the executable binary file is used as input for the hash function.
> - When set to 3, both the full path of the application executable and the executable binary file are used as input for the hash function.
> - When set to 4, the full directory name of the application executable is used as input for the hash function.
> - Specifying SQLSetConnectAttr. Immediately after each call to SQLConnect or SQLDriverConnect connecting to the ODBC Client, call SQLSetConnectAttr as shown:

> SQLSetConnectAttr(hdbc, 1054, `x`, SQL_IS_INTEGER)

> where `x` is one of the following values:

> - When set to 1, the full path of the application executable is used as input for the hash function.
> - When set to 2, the executable binary file is used as input for the hash function.
> - When set to 3, both the full path of the application executable and the executable binary file are used as input for the hash function.
> - When set to 4, the full directory name of the application executable is used as input for the hash function.