odbx_column_type(3) | OpenDBX | odbx_column_type(3) |
odbx_column_type - Returns the SQL data type of a column in the current result set
#include <opendbx/api.h>
int odbx_column_type
(odbx_result_t* result, unsigned long pos);
odbx_column_type() returns the data type of the requested column within the current result set returned by odbx_result(). The column type applies to all fields at the same position of the rows fetched via odbx_row_fetch(). The definitions are based on the SQL2003 standard and the data types of the database server have to comply to the specification of the standard. Data types provided by database implementations which are not covered by the SQL2003 standard are subsumed as ODBX_TYPE_UNKNOWN.
The result parameter required by this function must be a valid result set returned by odbx_result() and must not has been feed to odbx_result_finish() before.
Valid column indices for the requested column provided via pos start with zero and end with the value returned by odbx_column_count() minus one.
If a values less than zero is returned, an error occurred. Possible error codes are listed in the error section and the application can retrieve a textual message of the error by calling odbx_error().
A positive return value including zero indicates one of the SQL2003 compliant data types listed below. Before release 1.1.5 of the OpenDBX library, types were defined as ODBX_* instead of ODBX_TYPE_*. The old definitions are kept for backward compatibility but shouldn't be used any more. They will be removed at some point in the future.
Exact numeric values:
Approximate numeric values:
String values:
Large objects:
Date and time values:
Arrays and sets:
External links:
Vendor specific:
odbx_column_count(), odbx_column_name(), odbx_field_value(), odbx_result()
28 January 2019 |