Rename data

Command group Flag affected Reversible Execute on client Platform(s)
Data management YES NO NO All


Rename data {file-name/new-slot-name}


This command renames the data for a specified file class in a data file so that the data will then belong to a file with a different name; that is, it renames a slot. The existing file class name and the new slot name are specified as parameters.

The specified file class is disconnected from the data, and an empty slot and indexes for that file will be created as soon as that file is accessed again.

If the specified file name does not include a data file name as part of the notation, the default data file for that file is assumed.

If the file is closed or memory-only, the command does not execute and returns flag false.

If you are not running in single user mode, Omnis automatically tests that only one user is logged onto the data file (the command fails with flag false if this is not true), and further users are prevented from logging onto the data until the command completes.

This command sets the flag if it completes successfully and clears the flag otherwise. The command is not reversible.


Rename data {fCustomers/fCustomersArchive}
If flag true
OK message {File archived}
OK message {Cannot archive while more than 1 user is logged on}
End If