Adaptive Server and SQL Server version 11.0 and later have global variables specifically for text and image support. These variables are:
Variable |
Explanation |
Datatype |
---|---|---|
@@textptr |
The text pointer of the last text or image column inserted or updated by a process. |
binary(16) |
@@textts |
Text timestamp of the column referenced by @@textptr. |
varbinary(8) |
@@textcolid |
ID of the column referenced by @@textptr. |
tinyint |
@@textdbid |
ID of the database containing the object with the column referenced by @@textptr. |
smallint |
@@textobjid |
ID of the object containing the column referenced by @@textptr. |
int |
Each connection to Adaptive Server has its own instance of these variables. The variables are set at 0 at the beginning of a session. Adaptive Server updates the variables:
When the application updates a text or image data column during the session. If multiple text or image columns in the same row are updated at the same time, the variables describe the last text/image column in the row that was updated.
When the application inserts a row containing a non-NULL text or image value. If multiple non-NULL text or image columns are inserted in the same row, the variables describe the last non-NULL text or /. column in the row.