This submenu contains other special tools for DBF file handling.
Filter records (Ctrl+L)
Use this command to show/hide the Filter Panel. Type the needful value at appropriate edit box (or several values at the several edits) and press Enter key:
The filter will be applied and the grid will contain filter-satisfying rows only. To reset the filter change any of the filter edit's value.
At the picture above filters records which "on_order" field values more than 0 and "discontinu" is False.
There are 5 comparison filter commands supported:
- ">" - filter all of the rows, which the field's value more then the filter value.
- ">=" - filter all of the rows, which the field's value more or equal to the filter value.
- "<" - less then the filter value.
- "<=" - less or equal to the filter value.
- ">><" - not matching the filter value.
Case Sensitive and Partial Compare are the filter match options.
Also, there is the possibility to define the whole filter string (complex condition). It is the more flexible and powerful feature. Thus, you can:
- Use "or" key word (not "and" only).
- Define filter expressions priority, using brackets "(" and ")".
Although, these filter features are sufficient in some cases, SQL queries mechanism is the most mighty.
Sort DBF file (Ctrl+T)
The dialog window is destine for current table ascending or descending sorting by any of the fields:
- Click the speed button (or press Ctrl+Right shortcut) to add selected field to the "order by" list. You can to select multiple fields to add all of them.
- Then, you can choose the sort direction of every field. By default, the order direction is ascending.
- If you want to exclude some of the added fields - press Ctrl+Left shortcut or click appropriate speed button. Multiple selection is supported also.
After you've formed the sort list, click the OK button. The confirmation dialog box appears:
That means, the current file will be sorted physically without undo possibility. Actually, the DBF file will be recreated with the defined ordering. But before any of the file change it's backup (BAK-extension file) will be created. For example, if the current file full name is "D:\dbfs\table1.dbf" - the backup file will be "D:\dbfs\table1.bak".
After you click Yes button, current file will be sorted. And the table column headers will be marked as ascending or descending sorted (see the DBF File Viewer and Editor topic).
Also, you can click the column's header to fast sort the DBF file. Current DBF file will be ordered by the field. By default, the sort direction is ascending.
If the file is already sorted by the field was clicked - the current file will be ordered by this field by descending.
Set DBF file codepage
Select the item to set a new DBF file's codepage flag at the window appears:
New codepage will be applied immediately if the Preview checkbox is checked.
Also, you can see the complete list of DBF file codepages.
Compare DBF Files
In the Open Dialog appears, select the DBF file to be compared with the current one.
The command compares these two DBF files by their field names and lists identical and different fields:
Generate SQL Scripts
This very useful tool has been implemented to provide a possibility to create the table with the appropriate structure at a database, and insert the data into it. You can reach this by the use of execution the result SQL script file in a Database Management System (DBMS).
There are a lot of SQL script options:
While you change any of the option, this affects SQL script text at the Script Previewbox at once:
- CREATE TABLE clause - generate this SQL clause or not.
- Field names in  - bracket the field names.
- Syntax - field type names are depends on a custom DBMS syntax. E.g., "varchar" in MS SQL Server equals to "character varying" in Postgre SQL. So, this option affects the CREATE TABLE clause syntax.
- INSERT INTO clause - generate the SQL clauses for every record of the DBF file with the appropriate field values. At the Script Preview text box there are top 10 records to preview. After you'll click the Save button, INSERT INTO clauses for all of the DBF file records will be added to the text box and saved to the *.SQL file you have specified.
- Skip deleted records - skip those records while INSERT clauses forming.
- Character field quotes - what quotes (single or double) will be used with character field values at the INSERT INTO clauses.
- Trim trailing spaces - in a DBF file Character fields, the value is consists of the exact value, trailed with a spaces (" ") to field width. E.g., the field type is Character(10) and it's value displayed is "abcde". In this case, the exact value is "abcde ". To get the value to INSERT INTO clauses without those trailing spaces, check this option.
- Replace True/False with 1/0 - in some of DBMS Logical (boolean) values must be represented as 1 and 0 (True and False respectively). For that case, use this option.
- Replace CR/LF with ¶ - affects Memo field values containing line feed characters. If this option is unchecked, a line feed character will be represented as two of spaces (" "), and the whole Memo value will be transformed into a single string. If you want to mark line feed characters as "¶", check this option.
- Insert into defined fields - the list of the custom defined fields (comma separated), into which the values are inserted. The result SQL clause will be like: "INSERT INTO table1 (field1,field2,field3) VALUES ...".
- Datetime format - formats the Date and DateTime fields in compliance with the format you've specified. By default, the edit box contains system date and time format mask.
- File encoding - encoding if the result *.SQL file. It can be ANSI, Unicode, or UTF-8 encoding.
- Add GO clause - check this option to add GO clause after every amount of scripted records, defined in the step edit box.
The window is destine for any of the DBF file's fields statistics count. Double click needful cell or press Enter key at the dialog window appears:
Also, you can to export statistics grid to XLS, HTML, XML, or CSV file, as well as to print it. There are the appropriate buttons on the form.
Actually, this command is a set of SQL-queries, that tries to count all of the statistics (sum, minimum, maximum, average, distinct) by every the DBF file's field. The result is a usual temporary DBF file. It opens automatically after the queries was executed:
Implemented to fast crop leading or trailing spaces (or both). This command processes current field values. It's available for string fields (Character and Memo) only.
Sets NULL value in every record of the selected field, if the field can accept NULL values.
This command executes the Chart Wizard.
At the second step you should choose a type of the chart:
Then, select the current DBF file's fields to be used as data source for X and Y axis, as well as labels for X axis (optionally):
At the next step the construction will be completed. You can Copy the chart image to the clipboard, or Export to an image file (*.PNG, *.JPG, *.JPEG, *.BMP):
Also, you can preview and print the obtained chart at the last step of the Chart Wizard. Here you can resize the chart to place it on the page as you need - drag & drop the chart margins. Besides of that, choose the page Orientation and Print the chart:
Auto Fit Columns Width (Ctrl+W)
Fits columns width depends on current row's cells text width.
This dialog window is consist of two sections - General and Appearance:
General section contains options listed below:
- Language - DBF Commander Professional interface language.
- Associate to *.DBF files - create DBF file association with DBF Commander Professional without reinstalling the application.
- Open new files in existing instance - create new process or open new DBF file from Windows Explorer in existing instance of DBF Commander Professional (if any).
- Exit on Escape - check this option if you want to close DBF Commander Professional with Escape key instead of Alt+F4 shortcut.
- Pack Immediately - the Pack Table command will be executed after you delete a record at once.
- Do not confirm on delete and pack - use this option carefully. It removes a confirmation ("Are you sure you want to...") box on deleting records and packing tables.
- Create backup files (*.BAK) - it's not recommended to uncheck it. This will stop creating of backup files after the actions with the current DBF file, such as Sorting, convert ANSI to UTF-8, convert UTF-8 to ANSI, repair DBF file, convert DBF file from Windows encoding to MS-DOS encoding, convert DBF file from MS-DOS encoding to Windows encoding, remove Memo file flag, and so on.
Appearance related options:
- Grid Font Size - increase or decrease table grid font size.
- Charset - table grid's charset.
- Grid Colors - odd, even and current (cursor) rows colors.
- Tables List Width - width in pixels of the Tables List (see the DBF Commander's Main Window).
- SQL Panel Location - determines where the SQL Panel locates.