MvDBCOMMAND#
Used to issue commands to a database that has already been opened or created via the MvOPEN or MvCREATE tags. All database interfaces take these commands.
Syntax
<MvDBCOMMAND NAME = "string: { expression } | literal"
COMMAND = "string: { expression } | command-name"
PARAMETER = "optional-parameter">
The database must already be open or created via the <MvOPEN>
or <MvCREATE>
tags.
Attributes#
Attribute | Description |
---|---|
NAME |
(Optional) Database alias. When a database is opened with <MvOPEN> , it is referenced in all other database commands by that alias. If omitted, the index is opened for the primary database (which must be open). |
COMMAND |
(Required) The name of the command to execute. |
PARAMETER |
(Optional) Parameters for the command, if any. |
Common Commands#
All database interfaces support the following:
Command | Description | Parameter |
---|---|---|
log |
Logs interface-specific details to a file in the data directory. | (Optional) Filename to write log output to. |
MySQL Interface Only#
Command | Description | Parameter |
---|---|---|
manualcommit |
Sets connection to manual commit mode, requiring explicit commit commands. | (None) |
autocommit |
Restores automatic commit mode after each statement. | (None) |
MivaSQL Interface Only#
Command | Description | Parameter |
---|---|---|
subdir_char |
Splits table/index names into subdirectories at each instance of the specified character. MivaSQL manages the dirs. | The character to split on (e.g. _ ) |
Example#
<MvOPEN NAME="Merchant"
DATABASE="{ l.database }"
USERNAME="{ l.username }"
PASSWORD="{ l.password }"
TYPE="mivasql">
<MvDBCOMMAND NAME="Merchant" COMMAND="subdir_char" PARAMETER="_">
<MvQUERY NAME="Merchant"
QUERY="{ 'CREATE TABLE S01_MMUI_STORESELECTION ( ... field list ... )' }">