Database Toolbox Previous page   Next Page
namecolumn

Map resultset column name to resultset column index

Syntax

Description

x = namecolumn(rset, n) maps a resultset column name n, to its resultset column index, for the resultset rset, where rset was created using resultset, and n is a string or cell array of strings containing the column names. Get the column names for a given cursor using columnnames.

Examples

Type

MATLAB returns

In this example, the resultset object is rset. The column names for which you want the column index are DNAME and LOC. The results show that DNAME is column 2 and LOC is column 3.

To get the index for only the LOC column, type

See Also

columnnames, resultset


Previous page  logintimeout ping Next page

© 1994-2005 The MathWorks, Inc.