The ASEnterprise server class includes some restrictions for text, unitext, or image data.
A pointer in a text, unitext, or image column is assigned when the column is initialized. Before you can enter text, unitext, or image data into a column, the column must be initialized. This causes a 2K page to be allocated on the remote or SAP ASE. To initialize text, unitext, or image columns, use the update with a NULL or a non-null insert command.
Before you use writetext to enter text or unitext data or readtext to read it, the text or unitext, column must be initialized. Use update or insert non-null data to initialize the text column, and then use writetext and readtext.
Using update to replace existing text, unitext, and image data with NULL reclaims all of the allocated data pages, except the first page, in the remote server.
writetext, select into, DB-Library functions, or Client-Library functions must be used to enter text, unitext, or image values that are larger than 16KB.
readtext is the most efficient way to access text, unitext, and image data.
insert select and select into can be used to insert text, unitext, and image data to proxy tables, but a unique index is required.
direct_connect:
Specific DirectConnect servers support text and image data to varying degrees. See the DirectConnect documentation for information on text, unitext, and image support.
The server uses the length defined in the global variable @@textsize for the column length. Before issuing create table, the client application should set @@textsize to the required length by invoking set textsize.
The writetext command is not supported.
The readtext command is not supported.
Client-Library functions that use text pointers are not supported.
DB-Library functions that use text pointers are not supported.
patindex
char_length
datalength
If text pointers are supported, the server performs these functions by issuing an RPC to the DirectConnect server.
For DirectConnect servers that do not support text pointers, the server stores data in the sysattributes system table. Data pages are preallocated on a per column per row basis. The column size is determined by @@textsize. If this value is not sufficient an error is returned.
Specific DirectConnect servers may or may not support pattern matching against the text datatype. If a DirectConnect server does not support this pattern matching, the server copies the text value to internal data pages and performs the pattern matching internally. The best performance is seen when pattern matching is performed by the DirectConnect server.
You must use writetext, select into, or insert...select to enter text, unitext, or image values that exceed 450 bytes.
You can use select into and insert...select to insert text, unitext, or image values, but the table must have a unique index.