Global variables and text, unitext, and image data

text, unitext, and image values can be quite large. When the select list includes text and image values, the limit on the length of the data returned depends on the setting of the @@textsize global variable, which contains the limit on the number of bytes of text or image data a select returns. The default limit is 32K bytes for isql; the default depends on the client software. Change the value for a session with set textsize.

Table 15-12 lists the global variables that contain information about text pointers. These global variables are session-based. For more information about text pointers, see “Changing text, unitext, and image data”.

Table 15-12: Text pointer information stored in global variables

Global variable

Description

@@textcolid

Contains the column ID of the column referenced by @@textptr.

@@textdbid

Contains the database ID of a database containing an object with the column referenced by @@textptr.

@@textobjid

Contains the object ID of an object containing the column referenced by @@textptr.

@@textdataptnid

Returns the partition ID of the text partition into which data is inserted or updated.

@@textptnid

Returns the partition ID of a data partition containing the column referenced by @@textptr.

@@textptr

Contains the text pointer of the last text or image column inserted or updated by a process. (Do not confuse this variable with the textptr function.)

@@textts

Contains the text timestamp of the column referenced by @@textptr.