Electrical Design Software | Elecdes Design Suite by Scada Systems Ltd

How to Modify the Current Database Fields

General

Use this function to modify the field structure of the database: add fields, delete fields, change field names, field widths and the field order.

Procedure

  1. Select Modify Database Structure from the Context Menu or Edit Menu. The Modify Database Structure dialog box will be displayed.

  2. The grid editor at the top of the dialog shows the current structure of the file:
    Original NameRead-onlyThe names of a field, prior to any modification.
    New NameEditable TextThe new name for a field.
    WidthEditable Integer The width of a fields (in bytes).
    Required WidthRead-onlyThe minimum width a field needs to be, to avoid truncating any existing data.
    Compatible NameRead-onlyA 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 create a new field click the Add Field button. The Add New Field dialog box will appear. Enter the name for the new field into the Name edit box and the width of the field in characters into the Width edit box. You must type a field name that is not already present in the database. The field name can be a maximum of 10 characters.

    • To change the name of an existing field click on it in the Field List and click the Rename Field button. 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 the Delete Field button.

  3. 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 the Delete Field button. 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 the Add Field button.

    • Note: The grid editor supports common functions such as Undo and Copy/Paste, to facilitate working with large numbers of fields.

  4. Assess any warnings, and resolve any errors shown in the Warnings / Errors panel (you will not be able to proceed if there are errors).

  5. Click OK to 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.

ErrorField name already existsEDS 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.
ErrorDatabase must have one or more valid fieldsA 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.
WarningSome 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)
WarningField width is smaller than the width of existing dataExisting 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.
WarningField 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.
WarningField containing data will be removedThe 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 Add Field button.
NoteField name (but not data) has moved to a different positionAn 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.
NoteSome field names are longer than 10 bytesNon-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.
NoteSome field Compatible Names contain Unicode (non-ASCII) charactersNon-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.