Promotic

AddNew - method of the PmaDatabase object

Description:
The method serves for adding new empty record (all values are set to <Null>) into the database table. Contrary to the Add method, this empty record is written to disk.
Syntax:
Long AddNew()
Return value:
-1 - If an error occurred on the creation.
>=0 - Successful creation of the empty record.
Note:
Calling the method fails if the table has defined the index that disables to add a record with the <Null> value. In this case it is necessary to call the Add method and to initialize the record even before writing to disk.
After calling this method, values of the newly created table record can be set, for example, by means of WriteFieldValue
See also:
- PmaDatabase.Add (method)
Example:
JavaScriptVBScriptSelect and copy to clipboard

if (oDb.IsOpen())
{
oDb.AddNew();
}
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.