MvDELETE#
Marks the current database record for deletion. Records marked for deletion accumulate until they are actually deleted from the database with <MvPACK>
or unmarked using <MvUNDELETE>
.
<MvDELETE NAME = "string: { expression } | literal"
VIEW = "string: { expression } | literal">
Attributes#
Attribute | Description |
---|---|
NAME |
Database alias. When a database is opened with <MvOPEN> , it is referenced in all other database commands by this alias. |
VIEW |
(Optional) ODBC view. Support for ODBC has been dropped so this attribute can be omitted. |
<MvDELETE NAME="db_alias">
<MvPACK NAME="db_alias">
Deleted records are still visible to database searching and navigation until the database is packed. If the current record has been marked for deletion, the boolean variable db_alias.d.deleted
is set to true.
<MvUNDELETE>
removes a mark set with <MvDELETE>
from the current record in the database. Undeleted records will not be physically deleted by <MvPACK>
. <MvPACK>
permanently removes all records in the database that have been marked for deletion. Changes in database file size and record counts resulting from <MvPACK>
are not recorded until the active database is closed. All open index files are automatically updated after <MvPACK>
is executed. Use <MvREINDEX>
to update closed indexes.
For each of these tags, if NAME
is omitted, the action is applied to the primary database.
Tip
Because <MvPACK>
can be resource-intensive for large databases and does not automatically lock the database and index files, it should be used offline. You can use Miva Merchant Mia to pack files locally or take your website offline to perform maintenance and pack databases. If you pack the database online, use <MvLOCKFILE>
to request a lock on the database and index files while <MvPACK>
is executing.