Xbasic
SQL::TableInfoColumnNumber Method
Syntax
N ColumnNumber(Name as C)
Arguments
- Column_Number
The number of the column named. -1 if the column name is not in the column list.
- SQL::TableInfo
A SQL::TableInfo object.
- Name
Column (field) name.
Description
Get the index of a Column from the name.
Discussion
The ColumnNumber() method gets the subscript index of the requested column name in the Column array property.
Example
dim TableInfo as SQL::TableInfo dim ColumnIndex as N Connection.GetTableInfo(TableInfo, "customers") ColumnIndex = TableInfo.ColumnNumber("customerid") if (ColumnIndex > 0) then Names = Names + TableInfo.Column[ColumnIndex].Name + crlf() end if
See Also