This is a very useful tip for someone working with MapBasic. There are certain words reserved which cannot be used as a field name. Do not use a MapBasic keyword as a variable name which applies to Table and Column names as well.
Restrictions on reserved words do not just apply to MapInfo Pro. If uploading a table to a DBMS such as Oracle, PostGIS, or SQL Server, or converting to another third-party format like SHP, these systems have their own lists of reserved words which may not be used as table or column names.
Restrictions on Variable Names : Variable names are case-insensitive. A variable name may not begin with a number. Many MapBasic language keywords, such as Open, Close, Set, and Do, are reserved words which may not be used as variable names. An attempt to define a variable called Set, MapBasic will generate an error when compiling the program.
The table below summarizes the MapBasic keywords which may not be used as variable names.
Add Alter Browse
Call Close Commit
Create DDE DDEExecute
DDEPoke DDETerminate DDETerminateAll
Declare Delete Dialog
Dim Do Drop
Else ElseIf End
Error Event Exit
Export Fetch Find For
Function Get Global
Goto Graph If
Import Insert Layout
Map Menu Note
Objects OnError Open
Pack Print PrintWin
ProgressBar Proportion Put
ReDim Register Reload
Remove Rename Resume
Rollback Run Save
Seek Select Set
Shade StatusBar Stop
Sub Type Update
While