dbreader class : Read() method

Description

Reads the next line from the result set.

Syntax

instance.Read()

Arguments

None.

Return value

ClassDescription
boolWhether 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. Returns multi-line results.

5:

while(dbr.Read())

6:

... // It handles each row of the result.

7:

endwhile

8:

dbr.Release();

9:

cmm.Release();

10:

cnn.Close();

11:

cnn.Release();

Notes

Returns true if the read was successful. Otherwise, returns false.

Links for reference

None.

Copyright © Cooker All rights reserved.