Using DBF data in Delphi

Source: Internet
Author: User
Tags dbase ole paradox database access database

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
-----------------------------------------

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.