Home Notices Documents Classes Download Others Rice
Classes  >  dbreader  >  Read()
dbreader class : Read() method

Description

Reads the next row from the resultset.

Syntax

dbreaderInstance.Read()

Arguments

None.

Return value

ClassDescription
boolA value that indicates whether the read was successful.

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. A multi-line result is returned.

5:

while(dbr.Read())

6:

... // Performs a some processing on each row of results.

7:

endwhile

8:

dbr.Read();

9:

cmm.Read();

10:

cnn.Close();

11:

cnn.Read();

Notes

None.

Links for reference

None.

Copyright © Rice All rights reserved.