User`s guide
7 Functions — Alphabetical List
7-14
[ 6] [400876] [1004] [ 8] 'Sail Boat'
[ 3] [400999] [1009] [17] 'Slinky'
[10] [888652] [1006] [24] 'Teddy Bear'
Data contains the productTable data.
Display the number of columns in the Data element in the cursor object.
numcols = cols(curs)
numcols =
5
The data in the cursor object contains five columns.
After finishing with the cursor object, close it.
close(curs)
Close the database connection.
close(conn)
Input Arguments
curs — Database cursor
database cursor object
Database cursor, specified as an open SQL database cursor object created using exec.
Output Arguments
numcols — Number of columns
scalar
Number of columns in a data set, returned as a scalar.
More About
• “Connecting to a Database Using the Native ODBC Interface”