ERASE

ERASE

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

ERASE

Erases an object from an application directory.

Syntax #1

Erases an object from an application directory.

ERASE object name [FROM dirname] [KEEP]

Parameters

object

One of
constant, directory, display, document, EntitySet, form, menu, relationship, role, set, variable, window

name

The name of the object.

dirname

The name of the application directory from which object is erased.

KEEP

The database file associated with objname is not erased from the file system.

Comments

The ERASE command erases an object from an application directory. If dirname is not specified, object is erased from the base application directory, zim.

The target directory must have been accessed in update mode. You cannot erase objects from foreign directories.

For ERASE to proceed, the explicit dirname in the ERASE command (or the implicit directory zim) must match the owner-directory of object. Qualifying the name of object is a recommended programming practice.

Syntax #2

Erases an index belonging to a specified object.

ERASE INDEX ownername.fieldname

Parameters

ownername

The name of the EntitySet, relationship with fields, or structured application document to which fieldname belongs.

fieldname

The name of the field whose index is to be erased.

Syntax #3

Erases a field belonging to a specified object.

ERASE FIELD ownername fieldname

Parameters

ownername

The name of the EntitySet, relationship with fields, or structured application document to which fieldname belongs.

fieldname

The name of the field to be erased. Only virtual fields can be erased.

Comments

Only virtual fields can be erased.

If you erase an EntitySet or relationship with fields, all data in that object is lost. To save the data, copy it to another object (usually an EntitySet or application document), or use the UNLOAD or RELOAD programs to temporarily store the data elsewhere.
If you erase an application document, the data in the associated disk file remains untouched.

Example

erase entityset Employees from Personnel

Erases the EntitySet Employees from the Personnel directory.

erase relationship BelongsTo

Erases the relationship BelongsTo from the Zim application directory.

 

See Also

CREATE

CURSOR

PERMISSION

RENAME

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish