ODBC connections using a custom port are created with the port number truncated

Version 1

    Verified Product Versions

    AppSense Environment Manager 8.2AppSense Environment Manager 8.3

    Introduction

    When using the 'Create ODBC Connection' action (in an Environment Manager Policy Configuration) with a custom port, the ODBC connection is created but the port number is truncated from the 'Server' data pair string.

    The port information should be added into the 'Server' Data Pair connection string.

    The correct syntax is as follows:-

    <Server>\Instance,<Port>

    Example of a typical ODBC Connection that will be truncated: 

    Server:  DatabaseServer\DBInstance,1433

    This value will be represented as 'DatabaseServer\DBInstance' in the 'Data Sources (ODBC)' mmc console.

    Detail

    This is a limitation of the Microsoft ODBC API that is used to create the connection. 

    Environment Manager passes all the data pairs as specified but the API calls the 'ConfigDSN function' which specifies that the connection string values should not contain the following []{}(),;?*=!@ characters.

    To workaround this you will need to 're-write' the registry value of the server connection string with the port information using a 'Set Registry Value' action.

    This will need to occur 'after' the ODBC Create action has completed.

    The 'Server' data pair is stored under the following registry key:-

    HKEY_CURRENT_USER\Software\ODBC\ODBC.ini\<ODBC Connection Name>\Server (REG_SZ)