How to Update the Structure of a Database

Care must be taken when using the Update database structure tool in the Control Panel. The tool allows you to make structure changes to an existing database, but with certain limitations:

  • You cannot change the datatype of a field in a database. This is due to a variety of issues that arise when converting data from datatype to another.
  • You can not reduce the width of a field. This is due to truncation issues.
  • Beware that if you delete or rename a field, your existing web forms (that were generated by a Control Panel HTML generation tool) will not function without appropriate modification, that is you must edit the HTML of the web forms to incorporate the new database structure. You can edit the HTML on your website, or you can also re-generate the HTML web forms using HostedDatabase.com and then place them on your website.
  • If you add new fields to your database then you must also edit the web forms to reference the new fields.

You can perform the following operations to modify the structure of an existing database:

  • Edit Field Properties - Click on the Edit Info button next to the field in order to get into Edit Properties mode. Now you can change the Field Name, Field Width, and Field Label. To complete the process, click the Update button to save the changes, or Cancel to cancel your changes, if any.
  • Delete Field - Click on the Delete button next to the field in order to remove the field from the database. You will be prompted to confirm your desire to delete the field. Once deleted, all the data residing in the field is permanently purged from the database.
  • Add Field - Fill in the field property information for the new field you wish to add to the database: Field Name (up to 100 characters), Field Data Type, Field Width (up to 2,000 characters), and Field Label - optional (up to 100 characters). Click on the Add Field button to save the new field to the database structure. Note that the Field Width property is only used with the Text, Hyperlink, and E-mail data types. The width values for the other data types are fixed. For example, the width of all numeric data types is 4, which refers to 4 bytes to store the binary values (not 4 characters).

NOTE: We strongly recommend that you backup your database using the Download data from a database tool in the Control Panel before you make any changes to the database structure.

 
 

Copyright ©1999-2011 AMULET Development Corp. All rights reserved.