When a client application attempts to connect to a server, it sends a connection request specifying the following:
Whether or not character set conversion should be disabled for the connection (through the CS_NOCHARSETCNV property for Client-Library or the DBSETLCHARSET routine for DB-Library)
The character set to use for the connection
The language to use for the connection
Before accepting the connection, the server checks to see if it can support the requested language and character set.
The following table summarizes Adaptive Server and Open Server behavior at connection time:
Server supports client’s character set |
Server supports client’s language |
Server action |
ct_connect |
dbopen |
---|---|---|---|---|
Yes |
Yes |
Accepts the connection in the clients language and character set. |
Returns CS_SUCCEED |
Returns SUCCEED |
No |
Yes |
If character set conversion is disabled, it accepts the connection but forces it to its own character set. |
Returns CS_SUCCEED |
Returns SUCCEED |
If character set conversion is not disabled, it rejects the connection. |
Returns CS_FAIL |
Returns FAIL |
||
Yes |
No |
Informs the client that the connection will use:
|
Returns CS_SUCCEED |
Returns SUCCEED |
No |
No |
If character set conversion is disabled, it accepts the connection but forces it to:
|
Returns CS_SUCCEED |
Returns SUCCEED |
If character set conversion is not disabled, it rejects the connection. |
Returns CS_FAIL |
Returns FAIL |
Once a connection is established, the server:
Generates all messages in the connection’s negotiated language and character set
Performs all necessary character set conversion for both incoming and outgoing data (provided that character set conversion is not disabled for the connection)