Application icon

Add Item to Query Database

This function is used to create a new item in an open query database.

Click here for information on identifying an open database.

The key is used to create a new item where every field is empty except for the query database's associated key column. Note that the supplied key can only be empty if the database was opened with the Keyless option. If the database was opened with the Keyless option, the key field is ignored. If the database is not Keyless and the key field is empty, a runtime error will occur. When Keyless, the added item will be entirely empty.

Both fields may contain any of the escape sequences described in Escape Sequences.

The statement is only executed once for all execution modes.

The action test state will be set to true if the item was added. If the item is a duplicate, the database will not be modified and the action test state will be set to false.

When adding to a Keyless database, you can access the added row by use the Query Database-Last Row named variable as a parameter as a key description.

Note that the Query Database-Row Count named variable which was created when the database was opened, will be incremented.