An application calls ct_con_props to set, retrieve, or clear connection structure properties.
Connection properties define various aspects of a connection’s behavior. For example:
The CS_USERNAME property defines the user name that a connection will use when logging in to a server.
The CS_APPNAME property specifies the application name that appears in the Adaptive Server Enterprise sysprocess table after the connection is opened.
The CS_PACKETSIZE property defines the Tabular Data Stream™ (TDS) packet size, which determines the size of network packets that the application will send and receive over this connection. By default, Open Client Server (OCS) allows the server to choose a packetsize between 512 and 65535 bytes. Servers supporting Server Specified Packetsize like Adaptive Server Enterprise may choose a packetsize freely. The packetsize may also be smaller or larger than the packetsize specified with CS_PACKETSIZE.
When a connection structure is allocated, it picks up some default property values from its parent context. For example, if the CS_APPNAME property is set at the context level, all connection structures allocated from that context inherit the application name. Other properties that do not exist at the context level, such as CS_PACKETSIZE, default to standard Client-Library values.
For a complete list of connection properties, see the ct_con_props reference page in the Open Client Client-Library/C Reference Manual.