Input buffers

An application passes the address and length of an input buffer to the driver.

The length of the buffer must be one of the following values:
  • A length greater than or equal to zero

    This value is the actual length of the data in the input buffer. For character data, a length of zero indicates that the data is an empty (zero length) string. A length of zero is different from a null pointer. If the application specifies the length of character data, the character data does not need to be null-terminated.

  • SQL_NTS

    This value specifies that a character data value is null-terminated.

  • SQL_NULL_DATA

    This value tells the driver to ignore the value in the input buffer and use a NULL data value instead. It is valid only when the input buffer provides the value of a parameter in an SQL statement.

For character data that contains embedded null characters, the operation of HCL OneDB™ ODBC Driver functions is undefined; for maximum interoperability, it is better not to use them. HCL OneDB database servers treat null characters as end-of-string markers or as indicators that no more data exists.

Unless it is prohibited in a function description, the address of an input buffer can be a null pointer. In such cases, the value of the corresponding buffer-length argument is ignored.