NAME
SQLcolNamesSelect - execute a select statement, return the column names as a Tcl array

SYNOPSIS
SQLcolNamesSelect [ -1d ] result_array select_statement

DESCRIPTION

The SQLcolNamesSelect command executes the SQL select statement select_command and returns the column names in the Tcl array result_array. The return value of SQLcolNamesSelect is the number of columns in result_array. SQL errors are handled by appending the SQL error message to the results and returning TCL_ERROR.

This command is a specialized form of SQLexec(3).

Note that only the column names are retrieved from the database, no row data is retrieved. If only the column names are needed, then SQLcolNamesSelect is much more efficient than SQLselect.

This command uses a private, statically allocates SQL Data Area (SQLDA). Use of this command will not conflict with user defined cursors.

OPTIONS

-1d result_array will be a one dimensional Tcl array. Usually, result_array is returned a two dimensional Tcl array.

EXAMPLE

             SQLcolNamesSelect header * from vertex2

KEYWORDS
database, select

SEE ALSO
SQLselect(3), SQLselectRows(3), SQLcolTypesSelect(3)

BUGS
It might be nice if this command had an optional result_index argument.

Note that Ingres 6.4 does not allow interleaved access to two open cursors. Commands like SQLfetch and SQLcolNamesSelect both access two different cursors.