Contents Previous Next sqlcolnames

Obtaining the Column Names of a Result Set
Syntax sqlcolnames
See Also sqlnumrows , sqlexec

Description
Obtains the column names of the most recently generated result set. Returns an NR by NC character matrix where NR equals the number of columns in the result set, and NC is the length of the longest column in the result set.

Examples
If, at the O-Matrix prompt you enter
     sqlconnect("driver={Microsoft Access Driver (*.mdb)};Dbq=c:\omwin\omsql\Contacts.mdb;UID=;PWD=")
     sqlexec("SELECT * FROM Tickler")
     sqlcolnames
O-Matrix will display the column name for each column in the Tickler table
TicklerID      
ContactID     
TicklerDate  
TicklerText