Edit DBF File

These are the main operations for editing DBF file data:

 

Cut (Ctrl+X), Copy (Ctrl+C), Copy Record, Clone Record, Paste (Ctrl+V) in DBF file


These are the core clipboard operations:

  • Cut – cuts the current cell's value to the clipboard.
  • Copy – copies the current cell's value to the clipboard.
  • Copy Record – copies the values of all cells in the current row to the clipboard, separating the values by semicolons. Here's an example:

copy record

The clipboard will contain the text string "aaa;bbb;ccc;".

  • Clone Record – adds a clone of the current row at the end of the current file. In the example below, you can see what was before,

duplicate record, and what is after: duplicate record

  • Paste – tries to paste the clipboard contents as a value into the current cell.
    For example, if the clipboard contains the text string "aaa" and the destination field's type is Integer, the following error will be raised: "Could not paste the data. Please check the field type". However, if the clipboard contains the text string "12/31/2010", the system date format is "dd.mm.yyyy", and the destination field's type is Date, then the source value will be converted to the appropriate format, and the destination value will be "31.12.2010".

 

Find and replace in DBF file (Ctrl+F), Find Next (F3)


Here's the dialog box:

find and replace record

  • Find Fields– the fields covered by the search.
    The more fields you check in the list (the maximum number is 26), the slower will be the search. To check or uncheck all items, click the <All> item.
  • Find Text – the text to find. To start the search, click the Find Next button, or press Enter or F3.
  • Replace with – if you click the Replace button, the found cell's value will be replaced with this text.
  • Replace All – click to replace the values of all found cells.
  • Direction – the search direction.
  • Case Sensitive and Partial Compare – the search options.
  • Transparency – to change the transparency of the Find and Replace dialog box, move the slider bar.

If the search is successful, the main form will become active, but the Find and Replace dialog box will stay visible too.
To go to the next occurrence, click the Find Next menu item (or press F3). If the Find Text edit box is empty, the Find Text menu item will be disabled.

The search does not cover any deleted records.

 

Go to Record... (Ctrl+G)


When the dialog box opens, specify the record number you want to move to, and click Go (or press Enter).

 

Go to Field... (Ctrl+J)


If you know the name of the field that you need, press Ctrl+J and type in a few leading letters of the field name. The DBF Commander Professional will quickly jump to the appropriate field while you're typing the field name.

 

Append/Insert Record in DBF file (Insert)


If you execute this command, a blank record will be added between the current record and the previous record. After you enter the data, the record will be added to the end of the DBF file (and will become the last record).

 

Delete Record from DBF file (Ctrl+Del)


Use this command to delete the current record.
In fact, deleting a record from a DBF file does not remove the record but only marks it as deleted with an internal flag. So the "deleted" record actually continues to exist. Such records are displayed in red font, stricken out:

delete record

To completely remove all deleted records, use the Pack Table command. To restore the current record, click Recall Record. To restore all deleted records, click Recall All.
The Delete All Records command deletes all records in the DBF file (just like the Visual FoxPro's ZAP command).

 

Delete Field from DBF file


Deletes the current field in the DBF file. After the operation, a backup file (with the BAK extension) will be created.

 

Pack DBF Table


Packs the current DBF file. All deleted records (colored in bright red) will be removed completely. A backup file will NOT be created.

 

Recall Record (Ctrl+R)


Cancels the removal of a row. The deleted record will be restored.

 

Recall All


Restores all deleted records.

 

Set NULL


If a field value is NULL, the grid shows it as the NULL text. This means that the cell contains nothing, NULL. It is not the same value as an empty string ("") in a character field, or a zero value (0) in a numeric field.

If a field doesn't accept NULL values, the appropriate error box will appear. In this case, you can allow NULLs via the File Structure dialog window, and then try again.

Please note that files of the dBase type do not accept NULL values at all!

 

Go to Record (Ctrl+G)


When the dialog box appears, specify the record number you want to move to, and click Go (or press Enter).

 

Mark Column (Ctrl+M)


In the color dialog appears, choose a color to highlight the selected field:

highlight DBF field

The highlighting is removed once current DBF file is closed.