Insert, update, and delete smart large objects using the ODBC API

When you insert, update, and delete either a CLOB or BLOB data type, the application binds the data type by using SQLBindParameter with a C type.

When you insert, update, or delete a CLOB data type, the application binds the CLOB data type by using SQLBindParameter with C type as SQL_C_CHAR and SQL type as SQL_LONGVARCHAR.

When you insert, update, or delete a BLOB data type, the application binds BLOB data type by using SQLBindParameter with C type as SQL_C_BINARY and SQL type as SQL_LONGVARBINARY.

HCL OneDB™ ODBC Driver performs insertion of smart large objects in the following way:
  • The driver sends a request to the database server to create a smart large object on the server side in the form of a new file.
  • The driver gets back the file descriptor (for example, lofd) of this file from the database server.
  • The driver sends the preceding lofd file and the smart-large-object data that was bound by the application with SQLBindParameter to the database server.
  • The database server writes the data onto the file.