Cicode Programming Reference > Cicode Function Categories > Device Functions Introduction > DevNext

DevNext

Gets the next record in a device. If the end of the database is reached, the EOF flag is set and an error code is returned.

Syntax

DevNext(hDev)

hDev:

The device handle, returned from the DevOpen() function. The device handle identifies the table where all data on the associated device is stored.

Return Value

0 if the next record is read, or an error if the end of the database is reached.

Related Functions

DevEOF, DevPrev

Example

Status=0;
I = 0;
hDev = DevOpen("Log", 0);
WHILE Status = 0 DO
DspText(20 + I, 0, DevGetField(hDev,"Tag"));
I = I + 1;
Status = DevNext(hDev);
END
DevClose(hDev);

See Also

Device Functions