Delphi is a powerful Windows application development tool developed by the U.S. inprise company. She is a perfect combination of visual application development environments, reusable object-oriented programming languages, fast compilers, and database technologies.
Because of its fast speed, powerful, easy to learn and use and rapid development and other characteristics, and support XML and HTML, support the development of the WEB and the Internet, has been the majority of users love.
The most widely used database in the domestic PC is the DBF format database, which is the database format used in DBASE II, DBASE III and FoxPro. In order to make full use of the existing database resources and to develop more powerful application software under Delphi Environment, this article will discuss how to use DBF database (datasheet) and its transformation method in Delphi.
A database directly using DBF format
If the database or table in DBF format is used as the data resource in the development of the application, dBASE or FoxPro should be used as the configuration parameter in the "BDE Administrator" Database engine in Delphi, so that the DBF data can be modified and accessed directly in Delphi. See BDE Configuration Tool Chart (abbreviated).
Second, convert into the Paradox data table of Delphi Environment
Delphi Development tools allow users to create and Access database applications for servers such as Paradox and local interbase, and here we discuss ways to convert DBF to a Paradox database.
1. One of the auxiliary tools provided by using Database Desktop DB Desktop--delphi
The conversion is done using the copy function of the database Desktop (see Figure 2), and the operation process is as follows: 1 Selecting the Menu "Tools/utilities/copy ...", the "Copy" dialog box will appear, allowing the user to specify the DBF source file that will be converted. Here we selected the STUDENT.DBF file and pressed the "OK" button.
2 at this time, the "Copy to" dialog box, select the target file name or in the File name edit box to enter a new target file name, and give the Paradox data file extension. db.
3) and select the "Copy" button.
At this point, the database desktop transforms the DBF data student.dbf into Paradox student.db data. In the conversion process, the field type of the data structure is changed by reference to table 1.
Table 1:
The field type in DBF is converted to the Paradox field type
C Alpha
F(浮点型) Number
N Number
L Logical
D Date
Memo Memo
OLE OLE
Binary Graphic
-----------------------------------------