Rename method: Query class
Syntax
Rename(NewQueryName)
Description
The Rename method renames the existing query definition with NewQueryName. The Rename method can be used only with an open query, it cannot be used on a closed query. Before you use the Rename method, you must explicitly open the query object to be renamed (with either the Open or Create method.)
Note:
The Rename method takes place immediately. You don't have to save the query for the rename to occur.
Parameters
| Parameter | Description |
|---|---|
|
NewQueryName |
Specify the new name for the existing query. The maximum length of this parameter is 30 characters. |
Returns
An integer value: 0 means the query was renamed successfully.