Exporting data from CSV or text files to dBase is one of the simplest tasks for Exportizer. But if you do it for the first time, some explanation may be needed.
Before you start, please consider the following:
- To export one table, Exportizer standard edition is enough to perform the task. To export more than one table at a time, Exportizer Enterprise is required. Below, exporting one table is described.
- You can work with dBase and text/CSV data either via ADO or BDE interface. What's important:
- When using ADO and ODBC, the Exportizer bitness (i.e. 32-bit or 64-bit) must match the bitness of the corresponding ODBC driver.
- When using ADO and Microsoft Jet, Exportizer 32-bit must be used.
- When using ADO and Microsoft ACE, the Exportizer bitness must match the bitness of the installed Microsoft Office.
- When using BDE, Exportizer 32-bit must be used.
Note: If your operating system is 64-bit, you can install both Exportizer 32-bit and Exportizer 64-bit and use them independently.
Configuring CSV to DBF Exporting
If you are exporting data via GUI:
- Launch Exportizer.
- Register your source database. It must be a folder with .csv and/or .txt files. The interface can be ADO (recommended) or BDE; here are some hints on choosing the interface:
- Check if your CSV or TXT file has a schema, which describes the data structure. ADO schema is located in schema.ini file from the same folder; the schema file contains schemas for all data files in the folder. BDE schemas are located in .sch files from the same folder, one schema per file; schema file name must match the name of the data file (excluding extension). If you found the schema file for your data file, use the corresponding interface.
- If the schema does not exist, Exportizer will ask you to create it using its interface. But you can also create the schema manually. Anyway, you still can try to open the data file without creating a schema (using ADO interface), and if it works for you, leave everything as is.
- If you choose the BDE interface, you'll probably need some preparations on Windows Vista+ to get it to work, but there are guidelines in the Internet.
- Choosing ADO interface lets you build your own connection string for the source database.
- [This step is not required] Register your target dBase database. It must be a folder with .dbf files. Interface can be ADO or BDE. In the latter case, you'll probably need some preparations on the modern Windows systems (there are instructions in the Internet). In case of ADO, you can use your own connection string (see examples) to connect the database instead of specifying just the folder name. To let you easily identify the database, give it a friendly name. Anyway, you can register the target database later, in Export dialog.
Export Steps (GUI)
- Open the registered CSV or text database.
- Choose a table to export.
- Click Export button.
- Choose the destination format. For dBase, you have two options: dBase (DBF) and Database. They work completely different. Try both and compare. The first one is simpler to configure and faster, but does not support dBase versions greater than V. And the latter one requires registering the target database; if you already did that, just select the database from the database list, otherwise, click '...' button to register it.
- Specify the export parameters.
- Click Next and check the source-to-target field mappings.
- Click Export.
Converting CSV to DBF from Command Line
Below are some examples of exporting CSV files to DBF format.
Exporting a CSV file to dBase (DBF) format in Exportizer 32-bit:
"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer 8\exptizer.exe" /export /ExportType=DBF /ExportMode=REPLACE+INSERT /FieldMappings=ID=ID;FIRSTNAME=FIRSTNAME;LASTNAME=LASTNAME;CITY=CITY;COUNTRY=COUNTRY /dbfVersion=5 "/encoding=DBASE ENU CP437" /IncludeMemo /SrcDBInterface=ado /SrcDB=C:\TEST\CL_ADDR.csv /TrgDB=C:\TEST\CL_ADDR.dbf
Exporting all CSV files from a certain folder to dBase (DBF) format in Exportizer Enterprise 32-bit (target file names are copied from the source ones, except extensions):
"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer Enterprise 9\exptizer.exe" /export /ExportType=DBF /ExportMode=REPLACE+INSERT /dbfVersion=5 "/encoding=DBASE ENU CP437" /IncludeMemo /SrcDBInterface=ado /SrcDB=C:\TEST\*.csv /TrgDB=C:\TEST\*.dbf
Exporting several CSV files from a certain folder to dBase (DBF) format in Exportizer Enterprise 32-bit (target file names are specified explicitly in a separate table mappings file):
"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer Enterprise 9\exptizer.exe" /export /ExportType=DBF /ExportMode=REPLACE+INSERT /TableMappingsFile=C:\TEST\TblMapping.xml /dbfVersion=5 "/encoding=DBASE ENU CP437" /IncludeMemo /SrcDBInterface=ado /SrcDB=C:\TEST /TrgDB=C:\TEST
- Exporting CSV to DBF
- Exporting Large Tables
- Exporting BLOBs to Individual Files
- Exporting to HTML Using Template
- Importing Database Files from Explorer