Electrical Design Software | Elecdes Design Suite by Scada Systems Ltd

Updating Existing DBF Files


During the installation of an EDS update or overinstall of an existing EDS installation certain dBase files (*.DBF) in the existing installation will not be simply overwritten. The installer will attempt to combine the new files with any additions you have made to the existing file. This merging occurs when the new update contains a DBM file instead of a DBF file.

DBM Files and Merging

Within the installation media many updated DBF files are distributed with the extension DBM. These DBM files are simply DBF files with a different extension and can be opened using Database Editor.

During installation, the new DBM files will be merged with existing DBF files of the same name.

The merging process is intended to update the existing DBF file, retaining any new records that you have added and adding any new data from the new DBM file.

Sometimes conflicts can occur during the merging operation when there exists the same record with different data in both files. In this case, the data from the new DBM file is used in preference and two "merge conflict" files with the extension MRG will be produced, as well as the final DBF file.

The DBM files may have a DBM_ACTION column. This is a special column which can contain keywords to perform additional actions for that record when merging files. This column and its contents are never added to the target DBF.

Currently, the following keywords can be used to perform the associated actions:

Delete Deletes all the records with matching key from the target DBF.

Checking for Merge Conflicts

Once the EDS installation has completed the EDS directories should be searched for merge conflict files (*.MRG). The existence of these files indicates that a merging operation has had a conflict.

For each pair of files merged with a conflict there will be two MRG files. The two MRG files will contain the original contents of the DBF and DBM files that were being merged.

For example, if the installer was merging the file "MANUFACT.DBM" from the installer with the file "MANUFACT.DBF" from an existing installation and a conflict was encountered then the files MANUFACTDBM.MRG, MANUFACTDBF.MRG and MANUFACT.DBF would be produced.

  • MANUFACTDBM.MRG would contain the contents of MANUFACT.DBM.

  • MANUFACTDBF.MRG would contain the original contents of MANUFACT.DBF.

  • MANUFACT.DBF would contain the merged contents of the two files.

You can use Database Editor to inspect the contents of the MRG and DBF files and ensure the records that you require are present in the merged MANUFACT.DBF file.