16.20 - Inserting LOB Data - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

ODBC Driver for Teradata
October 2018
User Guide

To insert LOB data, ODBC programs have to take into account that the size of LOB data may be very large and it will rarely be feasible to insert the data in one single large chunk. Rather it is advisable to insert LOB data piecemeal.

The ODBC DATA_AT_EXEC feature should be used to implement this piecemeal insertion into the database. When using this feature, data are inserted separately from the request to insert these data.

The following ODBC identifiers are available to specify the use of DATA_AT_EXEC:

SQL_DATA_AT_EXEC is a pseudo length which indicates that the length is unknown at the time when the request to insert data is made and that data will be supplied later, possibly in several chunks.

SQL_LEN_DATA_AT_EXEC is a macro which has the same effect as SQL_DATA_AT_EXEC and in addition allows the total length of the data to be specified. For Teradata LOBs this length is optional.