DbEof

ODBC function.

The DbEof function tests whether the read pointer is at the end of the dataset or not. Not available in WinTask Lite.

Syntax

Ret = DbEof()

Return value

Ret, numeric return code. Ret is set to 1 if the pointer is after the last record of the dataset, or if there are no records to read; otherwise, Ret is set to 0.

Example

 

DbConnect("DSN=gpao;PWD=SILOG") ' connection to ODBC database named gpao

DbSelect("SELECT * FROM Business",DYNASET) ' select all records in table Business.

While not DbEof() ' while there are still records to read

Err=DbGetFieldString("CompanyNum",a$) ' a$ contains the field CompanyNum ;

  ' return code can be tested.

MsgBox(a$) ' display the result.

Err=DbMovenext() ' move to next record.

Wend