Obtain column information

When you have a row descriptor for the row, you can obtain information about the columns with the row-descriptor access functions.

The row-descriptor access functions are shown in Field and column information in the row descriptor. For each column in an SQL statement, you can obtain information about the column (such as its data type) from the row descriptor.

You can use the mi_column_count() function to determine how many columns are in the row. The number of columns in the row descriptor is the number of columns that the query has retrieved. Use this value to control the number of times to call the mi_value() or mi_value_by_name() function. Each call to mi_value() or mi_value_by_name() passes back one column value from the row structure to the DataBlade® API module.