Home News DOC Class DL Others Rice
Class  >  dbreader  >  Name(int)
dbreader class : Name(int) method

Description

Returns the name of the column.

Syntax

instance.Name(int columnIndex)

Arguments

ClassNameDescription
intcolumnIndexColumn index.

Return value

ClassDescription
stringColumn name.

Sample code

1:

connection cnn = new connection("Data Source=c:\somedirectory\somedatabase.sqlite3;Version=3;");

2:

cnn.Open();

3:

command cmm = new command("select * from sometable where id < 100;", cnn);

4:

dbreader dbr = cmm.Reader(); // Command execution. Returns multi-line results.

5:

string name = dbr.Name(0);

6:

dbr.Release();

7:

cmm.Release();

8:

cnn.Close();

9:

cnn.Release();

Notes

Returns the name of the column if the column corresponding to the argument exists. Otherwise, returns an empty string.

The argument should specify in a 0-based index.

Links for reference

None.

Copyright © Rice All rights reserved.