Locale – PB Docs 126

Locale database parameter

Description

Specifies the locale name that you want the Sybase Open Client
software to use when connecting to an SAP Adaptive Server Enterprise
database or a database accessed through DirectConnect in PowerBuilder.

note.png When to specify Locale

You must specify the Locale parameter before connecting
to the database.

Controls

  • ASE, SYC SAP Adaptive
    Server Enterprise

  • DIR Sybase DirectConnect

Syntax

Default

The default locale defined in your LOCALES.DAT file

Usage

Locales

Locales are stored as entries in a file named LOCALES.DAT.
The LOCALES.DAT file contains information about
the languages and character sets you are using with the Sybase Open
Client software. The Sybase Open Client installation places the LOCALES.DAT file
in the $SYBASELOCALES directory.

An entry in the LOCALES.DAT file has
the following format:

For example:

Why set Locale parameter

Setting a value for the Locale parameter lets you use a locale other
than the default locale
when accessing an Adaptive Server Enterprise
or DirectConnect database. If you do not set a value for Locale, Sybase
Open Client uses the default locale defined in your LOCALES.DAT file.

What happens

When you specify a value for the Locale parameter, PowerBuilder:

  • Allocates a CS_LOCALE
    structure for this connection

  • Sets the CS_LC_ALL value to the
    locale name you specify

  • Sets the SQL Server
    CS_LOC_PROP connection property with the new locale
    information

Overriding Locale parameter

If you have previously set a value for the Locale parameter
that includes settings for the language and character set you want
to use, you can override the language or character set values by
specifying new values for the Language or CharSet parameter and
reconnecting to the database.

Unicode data access

The DataWindow server can
access Unicode data in an ASE 12.5 or later Unicode database or
in Unicode columns in ASE 12.5 or later. The DataWindow server converts between
double-byte character set (DBCS) data and Unicode automatically,
provided that the Locale parameter is set with DBCS values. For
example, the Locale parameter should be set to chs or cht.

Examples

To set the locale to fra:

  • Database profile

    Type the following in the Locale box on the Regional Settings
    page in the Database Profile Setup dialog box:

  • Application

    Type the following in code:

[What happens]

Setting the Locale parameter to fra has
the same effect as individually setting both the Language and CharSet
parameters as follows:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x