The following method is recommended for populating an Adaptive Server table with text or image values larger than 100K:
insert all data into the row except the text or image values.
update the row, setting the value of the text or image columns to NULL. This step is necessary because a text or image column row that contains a null value will have a valid text pointer only if the null value was explicitly entered with the update statement.
Retrieve I/O descriptor settings for the column. This is done two ways:
Select the text or image column of interest, then call ct_data_info after the column’s value has been retrieved. For a description of this method, see “Retrieving the I/O descriptor settings”. This method works with all Sybase Servers that support the text and image datatypes.
Use the text and image global variables provided by Adaptive Server. For a description of this method, see “Using global variables to update a text or image column”. This method requires SQL Server version 11.0 or later, or Adaptive Server.
Update the columns as described in “Sending the new column value”.