Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

NCharLiteral – PB Docs 2022 – PowerBuilder Library

NCharLiteral – PB Docs 2022

NCharLiteral

database parameter

Description

Specifies whether the NChar literal replacement feature in the
Oracle client is enabled. This feature replaces string literals on the
client that are prefaced with the letter N with an internal format. The
internal format is decoded to Unicode by the database server when the
statement is executed.

When to specify NCharLiteral

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

Applies to

O10 Oracle 10g

ORA Oracle (for 11g and later)

Syntax

Parameter

Description

value

Specifies whether PowerBuilder replaces string
literals prefaced with the letter N in SQL command text. Values
are:

  • ‘No’

    (Default) The text of any literal is encoded in the
    same character set as the rest of the statement on the
    client.

  • ‘Yes’

    The text of any literal prefixed by N is replaced
    with an internal format.

Default value

NCharLiteral=’No’

Usage

The NCharLiteral database parameter requires Oracle 10.2 or higher
on both the client and the database server.

By default, in a SQL statement, the text of any literal is encoded
in the same character set as the rest of the statement. The character
set on the client is determined by the client character set defined in
NLS_LANG. When the statement is executed, the character set on the
client is converted to the character set on the database server.

Data in string literals is lost in the conversion if the character
set on the database server does not contain the characters used on the
client. NChar string literals are most affected by this issue because
they are designed to be independent of the character set on the database
server.

To avoid this data loss, add the letter N before string literals
that should be replaced with an internal format and set the NCharLiteral
database parameter to ‘Yes’. This setting causes the Oracle client to
encode all literals prefixed with N in statements on the client with an
internal format. The database server decodes the literals to Unicode
when the statement is executed.

For example, when NCharLiteral is set to ‘Yes’, the string “some
unicode data” in the following SQL statement is transferred from the
client to the server with no data loss:

Setting NCharLiteral to ‘Yes’ has no effect on DataWindow
functions.

Examples

To specify that string literals prefixed by the letter N should be
replaced with an internal format on the client:

  • Database profile

    Select the NChar Literal box on the Connection page in the
    Database Profile Setup dialog box.

  • Application

    Type the following in code:


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