Purpose
Retrieves the number of columns in the result set. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
Server_NumCols( StatementNumber )
StatementNumber is an integer value that identifies information about an SQL statement.
Return Value
Integer
Description
The Server_NumCols() function returns the number of columns in the result set currently referenced by StatementNumber.
Example
Dim hdbc, hstmt As Integer
hdbc = Server_Connect("ODBC", "DLG=1")
hstmt = Server_Execute(hdbc, "Select Name, Addr from emp")
Print "Number of columns = " + Server_NumCols(hstmt)
See Also:
Server_ColumnInfo() function