Tags Affected by ODBC Databases

In general, most MGI tags that use a database can be configured to use an ODBC database by setting the odbcDataSource, odbcUsername, and odbcPassword tag parameters.

The tag that is most directly affected by the use of an ODBC database versus the built-in MGI database is mgiEditDatabase. When a new database is created, mgiEditDatabase will attempt to add a numerical database field named "MGIIDFIELD". This is the default field that MGI uses as a unique ID for each database record. In addition to creating the "MGIIDFIELD" database field, MGI will attempt to make the "MGIIDFIELD" an auto-incrementing number. However, MGI will not always be able to create and auto-increment the "MGIIDFIELD" using an ODBC database.

If your ODBC database does not support auto-incrementing fields, the server administrator must populate the field manually. If you choose to not use the MGIIDFIELD as your unique ID field, you may remove it from the database, create a different unique ID field and reference your custom unique ID field by in the "uniqueIDFieldName" parameter of the mgiEditDatabase tag.

IMPORTANT: See the MGI ID and Other Field Requirements section for strict requirements on the contents of the MGIIDFIELD.

IMPORTANT: If MGI finds "MGIIDFIELD" as the first field in the database, MGI will try to use that field by default unless you specifically override it by including the "uniqueIDFieldName" parameter in the mgiEditDatabase tag. If the "MGIIDFIELD" is not the first field in the database and the "uniqueIDFieldName" parameter is not provided, the mgiEditDatabase tag will display an error.

The following tags will only work with an ODBC database that has an auto-incrementing (sometimes called a serial number) numerical field type. If MGI cannot create the field layout via the ODBC drivers, the server administrator will be responsible for recreating the exact field layout that is required by each MGI tag, including the "MGIIDFIELD" (which must be the first field and be an auto-incrementing number).

If necessary, you can determine the field layout of the databases for these MGI tags by first using the tag to create an internal MGI database. Next, create a page with the mgiEditDatabase tag and the "showMGIDatabases" parameter set to "Yes". Upload that database admin page to the server, access it with a web browser, and view the field layout for the database of any tag listed above.


[Return to the Using ODBC Databases Menu]


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]