Inserting LOB Data - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
17.10
Published
October 2021
Language
English (United States)
Last Update
2021-11-02
dita:mapPath
wxs1608578396899.ditamap
dita:ditavalPath
nkw1500504256726.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities

To insert LOB data, ODBC programs have to take into account that the size of LOB data may be very large; it will rarely be feasible to insert the data in one single large chunk. Teradata recommends inserting LOB data piecemeal.

Use the ODBC DATA_AT_EXEC feature to implement this piecemeal insertion into the database by inserting the data separately from the request to insert these data.

The following ODBC identifiers are available to specify the use of DATA_AT_EXEC:
  • SQL_LEN_DATA_AT_EXEC(LEN)
  • SQL_DATA_AT_EXEC

SQL_DATA_AT_EXEC is a pseudo length that indicates 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 allows the total length of the data to be specified. For Teradata LOBs, this length is optional.