Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Rename_Table subroutine ====== ==== Description ==== Changes the name of an attached table. ==== Syntax ==== **Rename_Table**( OrigTableName, database, NewTableName, LockFlag, Status ) ==== Parameters ==== The Rename_Table subroutine has the following parameters. ^Parameter^Description^ |//OrigTableName//|Specifies the name of the table to rename. To rename just the dictionary portion of a table, specify DICT.tablename. Specify DATA.tablename to rename the data portion only.\\ \\ Note: If running on a network system, other users must re-attached the renamed table before they can recognize it under its new name.\\ \\ Note: If you do not specify either DICT or DATA, the subroutine renames both the dictionary and the data files.| |//database//|Specifies the target database for the rename process. If database is null, the table is renamed in the database where //tablename// exists.| |//NewTableName//|Specifies the new table name.| |//Lockflag//|If true (1), lock the table during the rename process.| |//Status//|If true (1) on return, then the table was renamed successfully. Note that while this does indicate success or failure, the [[get_status|Get_Status()]] function is the preferred method for obtaining status information.|| ==== See Also ==== [[delete_index|Delete_Index]], [[get_status|Get_Status]], [[attach_table|Attach_Table]], [[alias_table|Alias_Table]], [[copy_table|Copy_Table]] ==== Example ==== <code> /* Renames the CUST table, in the current database, to CUST_BACKUP, locking the table during the rename process */ OldTableName = 'CUST' NewTableName = 'CUST_BACKUP' dbID = [[environment|@DBID]] LockFlag = 1 Status = '' call Rename_Table( OldTableName, dbID, NewTableName, LockFlag, Status ) ** ** </code> guides/programming/programmers_reference_manual/rename_table.txt Last modified: 2024/06/19 20:20by 127.0.0.1