MvPACK#
The <MvPACK>
tag in MivaScript is an empty-tag command that permanently removes all database records previously marked for deletion in the specified database alias and reclaims storage space. It also resets physical record numbers, so it’s important not to rely on record positions remaining constant as unique identifiers
<MvPACK NAME = "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 the alias. |
Example#
<MvDELETE NAME="db_alias">
<MvPACK NAME="db_alias">
<MvUNDELETE>
removes a mark set with <MvDELETE>
from the current record in the database. Undeleted records will NOT be physically deleted by <MvPACK>
.
When a database is packed, physical record numbers (as provided by the recno
built-in variable) are reset as required. For this reason, you should not code in a way that uses the physical record number as a unique identifier by which a record can be referred to. You may instead wish to define a database field in which you store a unique identifier for each record. For example: db_alias.d.id
.