How to Modify the Current Database Fields
Use this function to modify the field structure of the database: add fields, delete fields, change field names, field widths and the field order.
Select Modify Database Structure from the Context Menu or Edit Menu. The Modify Database Structure dialog box will be displayed.
- The grid editor at the top of the dialog shows the current structure of the file:
Original Name Read-only The names of a field, prior to any modification. New Name Editable Text The new name for a field. Width Editable Integer The width of a fields (in bytes). Required Width Read-only The minimum width a field needs to be, to avoid truncating any existing data. Compatible Name Read-only A unique field name of 10 bytes or less, if the new field name is longer than 10 bytes.
This may be required for any non-EDS applications using the DBF.
To modify the width of an existing field(s) select the field(s) you wish to modify in the Field List and change the field width in the Field Width edit box. The maximum field width allowed is 255 characters.
To change the name of an existing field click on it in the Field List and click thebutton. Type the new name and/or new width into the Rename Existing Field dialog box.
To remove a field(s) from the database select the field(s) in the Field List and click thebutton.
Use the grid editor, and the surrounding buttons to modify the database field list according to your requirements:
To reorder fields, select the fields in the grid editor, then:
Click the Up/Down buttons to the left of the grid editor (fields will move up or down one position at a time), or
Right click in the grid editor and choose a position in the Move Fields Up or Move Fields Down submenus.
To insert new fields, select the number of fields required in the grid editor, then right click and choose Add Records. The new fields will be inserted before the selected records.
To remove fields, select them in the grid editor, then then right click and choose Delete Records, or click thebutton. If any of the removed fields are original fields, they will be added to the dropdown adjacent to the Add Field button (so that they can be restored if required).
To add a new field (or previously deleted field) to the end of the field list, choose the "(new)" or previously deleted field in the dropdown under the grid editor, then click thebutton.
Assess any warnings, and resolve any errors shown in the Warnings / Errors panel (you will not be able to proceed if there are errors).
Clickto apply the changes to the database.
Warnings and Errors
As you modify the database field list, warnings and errors will be dynamically generated. Warnings will not prevent you from applying the structure changes to the database (but they may result in unintended consequences). Errors will prevent you from applying the changes, as they mean the structure is not valid. Most warnings/errors will tell you the field name of the relevant field, so you can easily find and check or fix the issue.
|Error||Field name already exists||EDS requires database field names to be unique (in a case-insensitive manner, so "TITLE" and "Title" are considered to be the same).|
Rename the field so it has a unique name.
|Error||Database must have one or more valid fields||A database must have at least one field with a valid name (not empty) and width (not zero).|
Add a field, and ensure fields have names and widths specified.
|Warning||Some fields invalid (blank names or zero width)||Your field list has some fields with no name or a zero width.|
If these are surplus records in the grid left over from editing, this warning can safely be ignored (invalid fields are not added to the database when changes are applied)
|Warning||Field width is smaller than the width of existing data||Existing data in the field will be truncated if changes are applied to the database.|
Increase the field width to the same or more than the required width to avoid truncation.
|Warning||Field name is too long [NVARCHAR(xxx)]||The field name will exceed the limit for column names in MS Access [NVARCHAR(64)] and/or SQL Server [NVARCHAR(128)].|
If the database is not an Access/SQL table, and the field is not expected to be matched against an Access/SQL table column name, this warning can safely be ignored.
|Warning||Field containing data will be removed||The field is in the database and has data in it, but has been removed from the field list (field data will be lost after changes are applied).|
If this was not intentional, the field can be re-added using the dropdown and adjacent button.
|Note||Field name (but not data) has moved to a different position||An original field name is used on a field other than the original field.|
This note can be ignored if you intended to rename fields. If you intended to reorder fields and their data, use the reordering options described in the Procedure above.
|Note||Some field names are longer than 10 bytes||Non-EDS applications can only read field names up to 10 bytes in length. The 'Compatible Name' shows the field name that non-EDS applications will see.|
This note can be ignored if you will not be using the DBF with non-EDS applications.
|Note||Some field Compatible Names contain Unicode (non-ASCII) characters||Non-EDS applications may have trouble reading the 'Compatible Name' field names, if the application cannot interpret UTF-8 field names.|
This note can be ignored if you will not be using the DBF with non-EDS applications. Otherwise, use only ASCII characters in the field name.