Xbasic
SQL::RowColumnNumber Method
Syntax
Index as N = ColumNumber(Name as C)
Arguments
- Index
The index of the column.
- SQL::Row
A SQL::Row object created with a DIM statement.
- Name
The name of a column.
Description
Get the number of the column named.
Discussion
The ColumnNumber() method returns the index of a column.
Example
dim conn as SQL::Connection dim rs as SQL::ResultSet dim row as SQL::Row dim connString as C dim select_exp as C connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}" select_exp = "select * from customer where bill_state_region = 'ny'" if .not. conn.open(connString) ui_msg_box("Error", conn.CallResult.text) end end if if .not. conn.execute(select_exp) ui_msg_box("Error", conn.CallResult.text) conn.close() end end if rs = conn.ResultSet rs.NextRow() row = rs.CurrentRow ui_msg_box("Column Number", "" + row.ColumnNumber("lastname")) conn.close()
See Also