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.
Return values:
-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
Example:
JavaScriptVBScriptSelect and copy to clipboard
if (oDb.IsOpen())
{
oDb.AddNew();
}
If oDb.IsOpen() Then
oDb.AddNew
End If