Delete

Takes two parameters, TableName and a boolean expression

Description:

There must be one Field in the Work Query named TableName.Alias; such as if deleting Records in the MemTab.Person table, there must be a MemTab.Person.Alias Field in the Work Query.

The value of the .Alias Field in the WorkQuery must match the Alias of the Record in the Database Table to be deleted. If the value of the .Alias Field in the WorkQuery is blank it will be skipped without error.

If an error occurs during the execution of this command on one or more Records, the error message will be placed into a Field in the Work Query named Error. The Field named Error will be created automatically if needed and it does not already exist.

Usage:

TableName, IfLenFld
TableName, [""]
[WorkWith], [""]
TableName, [WorkIf]
[WorkWith], [WorkIf]

Example:

WorkWith      "ToDo.Item"
SetNew "Alias", pItem
Delete
FailIfRecError
End WorkWith