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

TrimSpaces – PB Docs 125 – PowerBuilder Library

TrimSpaces – PB Docs 125

TrimSpaces database parameter

Description

Specifies whether PowerBuilder should trim trailing spaces from
data values retrieved from the following datatypes: Char, Char for
Bit Data, VarChar, and VarChar for Bit Data.

Controls

  • ADO.NET

  • ASE, SYC and SYJ Sybase Adaptive Server Enterprise

  • DIR Sybase DirectConnect

  • I10 Informix

  • IN9 Informix

  • JDB JDBC

  • ODBC

  • O90 Oracle9i

  • O10 Oracle 10g

  • SNC SQL Native Client for Microsoft SQL Server

Syntax

Parameter

Description

value

Specifies whether PowerBuilder should trim
trailing spaces from data of type Char, Char for Bit Data, and VarChar
for Bit Data. Values are:

  • 0

    Do not trim trailing spaces.

  • 1

    (Default) Trim trailing spaces.

Default

TrimSpaces=0 (ADO.NET, O90, O10, SNC, and
IN9) or TrimSpaces=1 (DIR, ASE, and SYC). For JDBC, the
default values depend on the PBTrimCharColumns value in the registry.
For ODBC, the default values depend on the PBTrimCharColumns value
in the PBODBnnn.INI file. (If the PBTrimCharColumns
keyword is missing for a particular database connection, the default
value for the ODBC interface is TrimSpaces=0.)

Usage

By default, PowerBuilder trims spaces from the following datatypes:
Char, Char for Bit Data, VarChar, and VarChar for Bit Data.

note.png ODBC database interface

Some ODBC drivers, such as SQL Anywhere, trim trailing spaces
before the data reaches the fetch buffer—even when TrimSpaces
is set to 0.

If your DBMS makes a distinction between Char data with trailing
spaces and Char data without trailing spaces when evaluating a WHERE clause
expression, you might receive the message Row
changed between retrieve and update
when your DataWindow object’s
update properties are set to “Key and updateable columns.” To
prevent this, change your DataWindow object’s update properties.
In embedded SQL, you can check
Sqlca.Sqlnrows after each update to determine if the update took
place. Avoid using Char data columns in the WHERE clause
of an UPDATE or DELETE statement
when TrimSpaces=1.

Examples

To specify that PowerBuilder should not trim trailing
spaces:

  • Database profile

    Clear the Trim Trailing Spaces In CHAR Data check box on the
    Syntax 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