Writing SQL records using a database device
To use an SQL device in CitectSCADA, you cannot use every the Cicode Device function; you can only use the following functions:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To write CitectSCADA data to an SQL database, use the DevWrite() function, but you need to add a new record and write to fields in the new record. No data is written to the database if you do not write to all fields.
For example:
FUNCTION
WriteRecipeData(INT hDevice, STRING sName, INT Water, INT Sugar, INT Flour, INT Salt, INT Yeast, INT Milk)
DevWrite(hDevice, sName);
DevWrite(hDevice, Water);
DevWrite(hDevice, Sugar);
DevWrite(hDevice, Flour);
DevWrite(hDevice, Salt);
DevWrite(hDevice, Yeast);
DevWrite(hDevice, Milk);
END
The following functions return error 267 (File mode is invalid) when the device type is SQL:
|
|
|
The follow function returns error 263 (Cannot read file) when the device type is SQL:
|
The following functions return error -1 when the device type is SQL:
|
|