Character Set

The Adaptive Server ADO.NET Data Provider communicates with Adaptive Server using a negotiated character set, which you can configure in the Adaptive Server ADO.NET Data Provider user interface as Client Charset or Server Default. Server Default is the default setting.

Usage

  • When you choose ClientCharset as your character set, you also specify a value for the CodePageType property. The valid values are ANSI, the default, and OEM.

  • When you choose Other, the value of the charset property is the name of the character set. For example, to set the negotiated character set to utf8:
    charset=utf8
  • Avoid using the charset property. .NET strings are unicode and must be converted to multibyte before they are sent to Adaptive Server as char or varchar parameters. Because of this, performance is affected if you use a character set other than the server's default.

  • Using an unsupported character set raises this error:
    [Sybase][driver] Could not load code page for requested charset
    To avoid this error, perform one of these:
    • In your driver’s user interface, go to the Advanced tab and select ClientCharset as your character set. If you choose Other, ensure that your specified character set is supported.

    • In the connection string, ensure that the charset property specifies a supported character set.