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. ====== Alias_Table subroutine ====== ==== Description ==== Creates a temporary synonym (an alias) for an existing table. The permanent database definition is not altered. ==== Syntax ==== **Alias_Table**(//locationlist//, //database//, //tablename//, //aliasname)// ==== Parameters ==== The Alias_Table subroutine has the following parameters. ^Parameter^Description^ |//locationlist//|States the location of the existing table. Can be specified in either of the following ways:\\ \\ [ //location// ]\\ [ //location//, //table_type// ]\\ [ //location//, //table_type//, //control_table_path// ]//\\ volume_pointer_name//\\ \\ Typically, this value will be the path to a directory containing Native Tables.| |//database//|Database to which the table belongs. If null, the current database is used. Use the List_Tables command to determine the database for a specific table. Note that most of the system tables belong to the "GLOBAL" database.| |//tablename//|Name of the table for which you are creating an alias. Use the form that is returned by List_Volume. If List_Volume shows that the table name is qualified (SALLY@TABLENAME, for example), you must also qualify the table name.| |//aliasname//|The alias for the table. If Alias_Table is successful, the specified table will be accessible using the alias name.| \\ **{{{guides:programming:programmers_reference_manual:caution.gif?28x21}} Caution:** Do not use the name of a system table for the alias name parameter. Use [[get_status|Get_Status()]] to check if Alias_Table failed.| ==== Remarks ==== Note: All parameters are passed by reference, not by value. ==== See Also ==== [[list_volume|List_Volume]], [[attach_table|Attach_Table]], [[copy_table|Copy_Table]] ==== Example ==== <code> /* The alias "BACKUP" is used for the CAR_PARTS table in the volume E:\DAT in the database INVENTORY. */ Declare Subroutine Alias_Table, Set_Status, Msg Declare Function Get_Status Alias_Table ("E:\DAT", "INVENTORY", "CAR_PARTS", "BACKUP") if Get_Status() then Msg(@window, "Unable to alias the CAR_PARTS table.") Set_Status (0) end </code> guides/programming/programmers_reference_manual/alias_table.txt Last modified: 2024/10/14 18:18by 127.0.0.1