Fixed-type buffers and unfixed-type buffers

There are several differences between fixed-type buffers and unfixed-type buffers.

The following table describes the differences between fixed-type buffers and unfixed-type buffers.
Buffer Description
Fixed type When you call ifx_rc_create() to create a row or collection buffer, you specify the following data types for the buffer:
  • The buffer data type (a row or one of the collection types)
  • The data types of the elements that are in the row or collection

When you retrieve the row or collection, the database server compares the source and target data types and converts data from one HCL OneDB™ SQL data type to another as necessary.

You can modify the row or collection buffer before you retrieve data into the buffer.

Unfixed type When you call ifx_rc_create() to create a row or collection buffer, you specify only the buffer data type (a row or a collection) and not the element types.

When you retrieve the row or collection, the database server does not compare data types because you did not specify the target data types. Instead, the row or collection buffer adopts the data types of the source data.

You must initialize the row or collection buffer before you modify it. To initialize the buffer, retrieve a row or collection into it.

The buffer type remains unfixed even when it contains data.