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

DevAppend

Appends a blank record to the end of a device. After the record is appended, you can use the DevSetField() function to add data to fields in the record.

You need to first call the DevOpen() function to get the device handle (hDev).

Syntax

DevAppend(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 (zero) if the record is successfully appended, otherwise an error is returned.

Related Functions

DevOpen, DevSetField

Example

INT
FUNCTION WriteAlarmCount( INT hDevice, STRING sAlarm,
INT iCount, INT iTime )
DevAppend(hDevice);
DevSetField(hDevice, "ALARM", sAlarm);
DevSetField(hDevice, "TIME", IntToStr(iTime));
DevSetField(hDevice, "COUNT", IntToStr(iCount));
END

See Also

Device Functions