Purpose
Discards a table's unsaved edits. You can issue this statement from the MapBasic window in MapInfo Pro.
Syntax
Rollback Table tablename
tablename is the name of an open table.
Description
If the specified table has been edited, but the edits have not been saved, the Rollback statement discards the unsaved edits. The user can obtain the same results by choosing Revert Table command, except that command displays a dialog box.
For example, if you edit a permanent table (such as WORLD), make a selection from WORLD, and browse the selection, MapInfo Pro will "snapshot" the Selection table, and call the snapshot (something like) QUERY1. If you then Rollback the QUERY1 table, MapInfo Pro discards any unsaved edits in the WORLD table, since the WORLD table is the table on which QUERY1 is based.
Using a Rollback statement on a linked table discards the unsaved edits and returns the table to the state it was in prior to the unsaved edits.
Example
If keep_changes Then
Table towns
Else
Rollback Table towns
End If
See Also:
Commit Table statement