Sign in Join
Wiki copytemporary

fpdbfexport

English · Français

Overview

FPC

The fpdbfexport module is part of fpDBExport in the FreePascal FCL database modules.

This export module provides export to DBF formats (e.g. DBase IV format). The format is still fairly popular because it is simple, and - opposed to e.g. CSV - is clear about what data type is enclosed in its fields. Many spreadsheet and database programs can import DBF files.

Lazarus

In Lazarus, the DBF export component is located on the Data Export tab.

Limitations and known bugs

In FPC before 2.6.4/Lazarus before 1.2.2, exporting to e.g. dbase IV format - that has a 10 character field length limit - of fields with longer field names will throw an error unless you populate the export fieldname mapping yourself.

Example

See the examples in your FPC source directory $(fpcdir)\source\packages\fcl-db\tests (see Databases#Running_FPC_database_tests), specifically testdbexport.pas.

The various export formats are run in

etc.

The procedure TTestDBExport.GenericExportTest shows how you can export to only supported field types (handy if you do not know in advance what field types are used in a dataset).

Another useful example is the the dbftool example included in FPC 2.6.4+:

The source is also downloadable via http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-db/examples/

See also


From the Free Pascal wiki, page "fpdbfexport", as it stood on 2017-06-30 after a change by E-ric, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.