NAME
SQLdescribeCursor - setup the SQL result area, get the column headers.

SYNOPSIS
SQLdescribeCursor cursor [result_array] [row_indice]

DESCRIPTION

The SQLdescribeCursor command gets the column headers for a select statement. The return value of SQLdescribeCursor is the number of columns in the header. The select statement must have been prepared with the SQLprepareCursor statement. This command should be immediately preceded by a SQLprepareCursor command. These two commands depend on an internal embedded SQL statement. If cursor does not match the cursor used in the preceding SQLprepareCursor statement, then an error message is produced and TCL_ERROR is returned.

SQLdescribeCursor also initializes the SQL results area that will contain the column data from SQLfetchCursor commands. One must call SQLdescribeCursor before calling SQLfetchCursor. The cursor argument of SQLprepareCursor and SQLdescribeCursor should match.

OPTIONS

result_array
    is a Tcl array that will contain the column headers. If the optional argument row_indice is not present, then the array will be 1 dimensional, with the first column header in result_array(0).

row_indice
    If row_indice is present, then column headers will be stored in result_array as a 2 dimensional Tcl array. The array will have the first column header in result_array(row_indice,0). row_indice need not be a number, but it usually is an integer greater than or equal to zero.

KEYWORDS
database, cursor

SEE ALSO
SQLprepareCursor(3), SQLfetchCursor(3)