KI_COLUMNS

Create a pseudo table of columns for a given table

Synopsis:
CALL KI_COLUMNS hFetch, sTable$, [hTable] TO status
status = 'ki_columns( hFetch, sTable$, [hTable] )
ArgumentEnumerationPurpose
hFetchHandle
sTable$Name of table to be described
hTableOptional handle of open table (used if table name is blank)
statusKDB_ERROR_ENUMReturn status
>KI_COLUMNS

KI_COLUMNS

This function is used to set up a virtual result set enumerating the columns for a specified table. The handle must have been allocated with a KI_ALLOC_HANDLE and it can be used in subsequent KI_FETCH calls to get the information. The row used in the fetch should be an instance of a _KDB_COLUMN record containing fields for such things as the column name, offset in the row and datatype.

If the table is already open on another handle it can be more efficient to reference the table using that handle rather than using the name which opens the table on a temporary handle. To do this leave the table name sTable$ blank and pass the handle as the optional third argument hTable. This argument is only used if the table name is blank.

You can get information about a specific column using KI_DESCRIBE_COL.

History
Introduced in KCML 5.02
See Also:
KI_BIND_COL, KI_BIND_PARAM, KI_BOUND_COL, KI_BOUND_PARAM, KI_DATABASES, KI_DEFAULT_ROW, KI_DESCRIBE_COL, KI_ERROR, KI_ERROR_TEXT, KI_EXECUTE, KI_FETCH, KI_GET_COL_LIST, KI_GET_ERROR_TEXT, KI_PARTITIONS, KI_PREFETCH_ROWS, KI_PREPARE, KI_SESSIONS, KI_SET_COL_LIST, KI_SQL, KI_SQL_XML, KI_TABLES, KI_TABLESPACES
KCML database status codes