Advantage Client Engine
Rename a data dictionary object.
UNSIGNED32 AdsDDRenameObject( ADSHANDLE hDictionary,
UNSIGNED8 *pucObjectName,
UNSIGNED8 *pucNewObjectName,
UNSIGNED16 usObjectType,
UNSIGNED32 ulOptions );
hDictionary (I) |
Handle of a database connection. |
pucObjectName (I) |
Name of object to rename. |
pucNewObjectName (I) |
New name for the object. |
usObjectType (I) |
Database object type. |
ulOptions (I) |
Renaming options. Specifying ADS_KEEP_TABLE_FILE_NAME when renaming table objects will not rename the physical table file. |
AE_INVALID_OBJECT_NAME |
The given new object name cannot be already in use by another dictionary object. |
AE_TABLE_NOT_EXCLUSIVE |
When renaming tables, the table must not be open by any user. |
AdsDDRenameObject can be used to rename an existing data dictionary object. Renaming tables requires that the table not be open by any user. By default, Advantage Database Sserver will rename the physical file to match the new table's object name. Specifying ADS_KEEP_TABLE_FILE_NAME will cause Advantage Database Server to not rename the physical file.
If the usObjectType parameter specifies a trigger object, the pucObjectName and pucNewObjectName parameters should be qualified with the table name the trigger belongs to followed by two colon characters ( :: ). For example, "Customers::AfterInsertTrig" would specify you want to rename the trigger called "AfterInsertTrig" that belongs to the "Customers" table.
Note Renaming a user while that user is connected is not recommended. The renamed user's permissions will not be affected in any way, but some places where the user name is logged may not reflect the user's new name.
Note Scripts, views, etc which contain references to renamed objects will not be automatically modified to reflect name changes.