renameTable( )
Renames a table in a database.
Syntax
<oRef>.renameTable(<old name expC>, <new name expC>)
<oRef>
The database in which to rename the table.
<old name expC>
The current name of the table.
<new name expC>
The new name of the table.
Property of
Database
Description
renameTable( ) renames a table in a database, including all secondary files such as index and memo files.
The table to rename should not be open.
By specifying a path in <new name expC>, the table, together with its' associated files, is moved to that destination and renamed <new name expC>. Associated files are moved regardless of whether <old name expC> uses the .dbf designation.
If a path is specified in <old name expC>, and no path is specified in <new name expC>, the table is moved to the location of the <oRef> database or (in the case of the default database_app.databases[1]) to the default directory.
To rename a Standard table, you can always use the default database in the default session by referring to it through the databases array property of the _app object. For example,
_app.databases[ 1 ].renameTable( "Before", "After" )