The mgiEditDatabase Tag

Tag Behavior

The mgiEditDatabase tag creates a web interface that allows you to create, modify and delete databases, tables, fields, and records.


Tag Syntax

The mgiEditDatabase tag has no required parameters and seven optional parameters. The tag form is:

<mgiEditDatabase modifyTables="Yes/No" modifyFields="Yes/No"
modifyRecords="Yes/No" databaseFileLocation="File Path"
tableName="Name" deleteRecordCheck="Yes/No" 
databaseDeletionPermission="Yes/No">

Required Parameters:

  • None.

Optional Parameters:

  • modifyTables="Yes" or "No" where "Yes" indicates that database tables are modifiable and where "No" indicates that database tables are not modifiable. The default is "No".
  • modifyFields="Yes" or "No" where "Yes" indicates that database fields are modifiable and where "No" indicates that database fields are not modifiable. The default is "No". The modifyFields and modifyRecords parameters are mutually exclusive (you may only modify one or the other). See field types below.
  • modifyRecords="Yes" or "No" where "Yes" indicates that database records are modifiable and where "No" indicates that database records are not modifiable. The default is "No". The modifyFields and modifyRecords parameters are mutually exclusive (you may only modify one or the other).
  • databaseFileLocation="File Path" where "File Path" is the relative path to the database you wish to modify. If the databaseFileLocation parameter is not specified, then a list of database files in the same folder level as the mgiEditDatabase tag is displayed.
  • tableName="Name" where "Name" is the name of the table you wish to modify. If the tableName parameter is not specified, then a list of tables for each database file is displayed.
  • deleteRecordCheck="Yes" or "No" where "Yes" indicates that record deletions are verified and "No" indicates that record deletions are not verified. The default is "No".
  • databaseDeletionPermission="Yes" or "No" where "Yes" indicates that the option for deleting database files is available and "No" indicates that the option for deleting database files is not available. The default is "No".

Field Types: Any field type can be indexed. Only Indexed fields can be used to order database search results using the orderBy parameter of mgiSearchDatabase.

  • Whole Number (Integer): a whole number field can contain only whole numbers without decimals such as years, quantities, etc.
  • Decimal Number (Floating Point Number): a decimal number field can contain decimal numbers such as prices, weights, tax rates, percents, etc.
  • True/False (Boolean): a field containing the values "True" or "False" to discriminate records.
  • Short Text: a short text field can contain up to 250 alpha-numeric characters.
  • Long Text: a long text field can contain text that is greater than 250 alpha-numeric characters.

Search Results Limit:

  • When a record search is performed in the modifyRecords mode of mgiEditDatabase, a maximum of 250 records will be returned. Refine your search if the search returns more than 250 records.


Example Usage and Output

<mgiEditDatabase modifyTables="Yes" modifyFields="Yes>

To use the mgiEditDatabase tag, place the tag and parameters on a page, then access that page online. The mgiEditDatabase tag and parameters in this example is used to create the structure of a new database by defining the tables and fields in the database. First select or create a database:

Then select a table to modify:

Finally, create or modify fields. The following fields will be used with a bookstore database:

<mgiEditDatabase modifyTables="Yes" modifyRecords="Yes">

The mgiEditDatabase tag with these parameters in this example is used to import existing data or enter new data into database records. As with the previous example, first select a database and a table, then import, search, view, delete, or export records. The following is a "search" screen from mgiEditDatabase.


Suggested Usage

  • Database


[Return to the Referencing MGI Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]