Using the DBF Utility
Return to Introduction  Previous page  Next page
If you want to open a different DBF use the Open DBF button, seen below, to select it.



When the DBF Utility attempts to open the DBF it tries to use the same DBF driver that was used the last time the utility was run. If it has troubles using that driver it tries the other DBF drivers. You can change the driver in use by selecting a different one from the DBF Driver combobox.

Use the Open Index button to select the indexes for the DBF. The index details are displayed in the right pane of the window. You can copy some of the index information - name, key expression, condition expression - to the clipboard by using the context menu.



If you see an "Error using index" message you may have index expressions that use functions that are not known to the utility. You can update the utility so that it "knows" about these functions by providing them in a DLL. See the page Extending the DBF Utility for details.

The Browse Data button calls up a browser program to view the contents of the DBF. By default the browser is VO's DBFVIEW, as in the DBServer Editor, but it can be configured for other DBF browsers through VOPP Plus!.

The push-pin button can be used to keep the utility on top of all other windows.

The three buttons at the bottom of the window let you send information to the clipboard or direct to the VO source code editor, as determined by the Destination combobox.

The first button, Comment, turns the DBF structure into a comment block, as shown below:

/*
Structure of E:\CAVO26\SAMPLES\GSTUTOR\CUSTOMER.DBF

Field No.  Field Name  Type   Len   Dec
---------  ----------  ----  ----  ----
    1      CUSTNUM       N      5     0
    2      FIRSTNAME     C     10     0
    3      LASTNAME      C     10     0
    4      ADDRESS       C     25     0
    5      CITY          C     15     0
    6      STATE         C      2     0
    7      ZIP           C      5     0
    8      PHONE         C     13     0
    9      FAX           C     13     0

       Total Record Length:    98
*/

The button DBStruct Array turns the stucture into an array, compatible with that returned by DBStruct(), e.g.:

{ ;
{ "CUSTNUM",    "N",    5,    0 }, ;
{ "FIRSTNAME",  "C",   10,    0 }, ;
{ "LASTNAME",   "C",   10,    0 }, ;
{ "ADDRESS",    "C",   25,    0 }, ;
{ "CITY",       "C",   15,    0 }, ;
{ "STATE",      "C",    2,    0 }, ;
{ "ZIP",        "C",    5,    0 }, ;
{ "PHONE",      "C",   13,    0 }, ;
{ "FAX",        "C",   13,    0 } ;
}

The Create Function button generates code to re-create the DBF and indexes. The code produced is fully customisable and so can be altered to suit your coding style. The next page shows more information about the Create Function feature.




© Piko Computing Consultants, 1998-2002