This statement 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. Key field formats are described in Query Database Keys.
By default, the added row will be appended to the end of the file. You can specify that you want the row inserted at a particular index. For convenience, the specified insert row number can be preceded by a #. When inserting a row, the Query Database Insert Row named variable will be set to the number of the insert row preceded by a #.
All text 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. In a non keyless database, if the item is a duplicate, the database will not be modified and the action test state will be set to false.
When appending to a Keyless database, the added row is at Query Database-Last Row. When inserting you can always use the Query Database Insert Row named variable as an absolute reference to the inserted row.
Note that the Query Database-Row Count named variable which was created when the database was opened, will be incremented.