NCharBind

Description

Specifies whether PowerBuilder binds input string parameters to the Char or NChar datatype.

Applies to

ADO.NET (Oracle.DataAccess.Client only)

O90 Oracle9i

O10 Oracle 10g

ORA Oracle (for 11g and later)

SNC SQL Native Client for Microsoft SQL Server

MSOLEDBSQL Microsoft OLE DB Driver for SQL Server

Syntax

NCharBind=value

Parameter

Description

value

Specifies whether PowerBuilder binds string input parameters to the Char or NChar datatype. Values are:

  • 0

    Binds string input parameters to the Char datatype.

  • 1

    Binds string input parameters to the NChar datatype.


Default value

NCharBind=1 for SNC, NCharBind=0 for other interfaces

Usage

For Oracle, the default NcharBind=0 setting is recommended for binding Char, Varchar, Long and Clob data. NcharBind=1 is recommended for binding Nchar, Nvarchar2 and Nclob data.

For SNC, the default NcharBind=1 is recommended for binding Nchar, Nvarchar, Ntext and Nvarchar(max) data. It encodes the string data as Unicode. NcharBind=0 is recommended for binding Char, Varchar, Text and Varchar(max) data. This setting converts the data to the ANSI string determined by the current operating system code page.

DisableBind must be set to 0

For NcharBind to take effect, the DisableBind parameter must be set to 0. DisableBind=1 overrides the NcharBind setting.

Examples

To specify that string arguments should be bound as the NChar datatype:

  • Database profile

    Select the NCharBind box on the Transaction page in the Database Profile Setup dialog box.

  • Application

    Type the following in code:

    SQLCA.DBParm="NCharBind=1"

See also

BindSPInput

DisableBind

RPCRebind

UnicharBind