The ifx_rc_create() function
The ifx_rc_create() function creates a buffer for a row or collection.
Syntax
ifx_rc_create(rchandle, typespec)Arguments
The function
accepts the following arguments.
| Argument | Type | Use | Description |
|---|---|---|---|
| rchandle | HINFX_RC | Output | Handle for a row or collection buffer |
| typespec | SQL_CHAR | Input | Type specification for the buffer. See the following table. |
The following table describes the syntax for the typespec argument.
| Type of buffer | Syntax | Example |
|---|---|---|
| Unfixed-type collection | COLLECTION |
COLLECTION |
| Fixed-type collection | or where type is the HCL OneDB™ SQL data type for the elements in the collection |
COLLECTION SET (int not null)or |
| Unfixed-type row | ROW |
ROW |
| Fixed-type row | ROW [“name"] (field_id type [, field_id
type, ...]) where:
|
ROW “employee_t" (name char(255), id_num
int, dept int) |
Usage
The ifx_rc_create() function
allocates memory for a row or collection buffer and returns a handle
to the buffer. The following table describes how the function initializes
the buffer.
| Type of buffer | Initial value for the row or collection | Initial value for the contents of the row or collection |
|---|---|---|
| Fixed-type collection | Non-null | Empty |
| Fixed-type row | Non-null | Each value is null |
| Unfixed-type collection | Null | Empty |
| Unfixed-type row | Null | Empty |
For a row, the function sets the seek position to element number one. An empty collection buffer does not have a seek position.