Promotic
WikipediaLinkedInYoutubeTwitterFacebook

AddNew - method of object PmDatabase

Description:
The method serves for adding new empty record (all values are set to <Null>) into the database table. Opposed the Add method this empty record is written to disk.
Syntax:
AddNew As Long
Calling:
oDb.AddNew
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 use 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 FieldValues

See also:
- Add
Example:
If oDb.IsOpen Then
  oDb.AddNew
End If
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice