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

Supported SQL Server datatypes – PB Docs 125 – PowerBuilder Library

Supported SQL Server datatypes – PB Docs 125

Supported SQL Server datatypes

The SQL Native Client database interface supports the datatypes
listed in Table 9-1

Table 9-1: Supported datatypes for Microsoft SQL Server 2005

Binary

Real

Bit

SmallDateTime

Character (fewer
than 255 characters)

SmallInt

DateTime

SmallMoney

Decimal

Text

Float

Timestamp

Identity

TinyInt

Image

VarBinary(max)

Int

VarBinary(n)

Money

VarChar(max)

Numeric

VarChar(n)

NVarChar(max)

XML

NVarChar(n)

The XML datatype is a built-in datatype
in SQL Server 2005 that enables you to store XML documents and fragments
in a SQL Server database. The XML datatype
maps to the PowerScript String datatype. You
can use this datatype as a column type when you create a table,
as a variable, parameter, or function return type, and with CAST and CONVERT functions.

Additional datatypes are supported for SQL Server 2008. For
more information, see “Support for new datatypes
in SQL Server 2008”
.

note.png Datatype conversion

When you retrieve or update columns, PowerBuilder converts data appropriately
between the Microsoft SQL Server datatype and the PowerScript datatype.
Keep in mind, however, that similarly or identically named SQL Server
and PowerScript datatypes do not necessarily
have the same definitions.

For information about the definitions of PowerScript
datatypes, see the PowerScript Reference.

In SQL Server 2005, the VarChar(max), NVarChar(max),
and VarBinary(max) datatypes
store very large values (up to 2^31 bytes). The VarChar(max)
and NVarChar(max) datatypes
map to the PowerScript String datatype and
the VarBinary(max) datatype
maps to the PowerScript Blob datatype. You
can use these datatypes to obtain metadata, define new columns,
and query data from the columns. You can also use them to pipeline
data.

Working with large data values

For
large data values of datatypes Text, NText, Image, Varchar(max), NVarchar(max), VarBinary(max),
and XML, the SNC interface supports reading data
directly from the database using an embedded SQL statement.

Example 1:

Example 2:

If the result set contains a large datatype of type Text or Varchar(max),
using ANSI encoding, you must set a maximum size for each large
value using the PBMaxBlobSize database parameter. For other large
datatypes, there is no limitation on the size of the data. The SNC
interface retrieves all the data from the database if there is sufficient
memory.

The SNC interface supports inserting and updating values of
large datatypes using embedded SQL INSERT and UPDATE statements.
You must set the DisableBind database parameter to 0 to enable the
SNC interface to bind large data values. For example:


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