DBTextLimit

Description

Specifies the maximum length of a text field that DB-Library™ or CT-Library returns when you include the text field in a SQL SELECT statement.

You can set the DBTextLimit parameter if you want to include a long text string in a report without treating the text as a binary large object (blob) datatype.

Applies to

Syntax

DBTextLimit = 'value'

Parameter

Description

value

The maximum length in bytes of a text field that DB-Library or CT-Library returns when you include the text field in a SQL SELECT statement. The range of valid values is from 0 bytes to 32,763 bytes.

When you set DBTextLimit to 0, DB-Library or CT-Library returns the maximum length text field.

Default

The default value for DBTextLimit is the default specified by SQL Server for the DBTEXTLIMIT DB-Library or CS_TEXTLIMIT CT-Library connection property (see your SQL Server documentation).

Usage

The text field length that DB-Library or CT-Library returns is the lesser of the DBTextLimit value and the setting for the SQL Server global variable @@textsize.

If the setting for @@textsize is less than the value you specify for DBTextLimit, DB-Library or CT-Library returns the @@textsize value.

Examples

Example 1

To have DB-Library or CT-Library return a text field that is up to 32,000 bytes long when you include the text field in a SQL SELECT statement, type 32000 in the Text Limit in SQL box (when using the SYC interface), or Maximum Length of Long VarChar box (when using the DirectConnect interface) on the Syntax tab in the Database Profile Setup dialog box.