The "TableCreate" Command |
This command creates a table which has previously been defined using the "TableDefinition" command.
It is an error to create a table that already exists.
If you have defined that the "Table" automatically creates tables then you probably won't need to use this command unless you wish to re-create an existing one.
This command takes these parameters:
The default for this parameter can be set via the DEFAULT_TableCreate_ExistingOK macro. This is initially "N".
If you don't delete the table and the table already exists then the create will fail, to prevent this you can use the TableExists function to first determine if the table exists.
The default for this parameter can be set via the DEFAULT_TableCreate_DropExisting macro. This is initially "Y".
EXAMPLE |
<$TableCreate "Component"> <$TableCreate "Directory"> <$Table "SomeTable"> <$TableCreate> <$/Table> <$Example STATE="REMEMBER">
Another example:
#{ for @@X = 1 to RxTable.0 #info "CREATING: <??RxTable.@@X>" if "<??RxTable.@@X>" <> "_Streams" and "<??RxTable.@@X>" <> "_Storages" then if not TableExists("<??RxTable.@@X>") then <$TableCreate "<??RxTable.@@X>"> end if end if #}