qdb_column_name()

Return a column's name

Synopsis:

#include <qdb/qdb.h>

const char *qdb_column_name( qdb_result_t *result, int col );

Arguments:

result
A pointer to a result structure to check.
col
The index of the column to get the name for, where 0 indicates the leftmost column.

Library:

qdb

Description:

This function returns the name of the column found at the specified index in the specified result set. The column indexes are based on the database schema in use when the table was created.

Returns:

A pointer to the column's name, or NULL if an error occurred (errno is set). The string containing the column name is part of the result set, so the string memory is freed (along with the rest of the result set memory) by qdb_freeresult(). If you want to keep the column name longer, you must create a copy of the string and manage that copy's memory.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes