You are on page 1of 3

DBF2MySQL Version 1.05 freeware Copyright (C) by Alexander Eltsyn E-mail: ae@nica.ru WWW: http://www.nica.

ru/~ae Thanks to Johan Ekenberg <johan@ekenberg.nu> for the fixing problem with codepage conversion The program is also the subject of following copyrights: Copyright Copyright Copyright Copyright (C) (C) (C) (C) T.c.X. DataKonsult AB 1998 Justin P. Yunke <yunke@productivity.org> 1998 Ken Kyler Bob Silva <bsilva@umesd.k12.or.us> WHAT IS THIS? DBF2MySQL is Win32 application to transfer data from FoxPro .DBF files into MySQL server. To use this program you need an TCP/IP stack installed and configured. KEY FEATURES: * it requires no ODBC or other special clients to access MySQL and .DBF tables; * editable "CREATE TABLE" queries; * column names substitution/exclusion; * "batch" table transfer mode; * .dbf tables preview BATCH TABLE PROCESSING If you need to transfer periodically a constant set of .dbf tables, this feature is for you. First of all, the "batch script" is to be created. Then you may give it as a command line argument for DBF2MySQL.exe. You may also specify in command line connection details DBF2MySQL <script name> [<host> <port> <database> <user> [<password>]]

BATCH SCRIPT FORMAT DESCRIPTION Each line of the batch script contains instruction for one .DBF table. Script line format (all parameters may be quoted with `"`): <dbf_file_name>,<mysql_table_name>,<ReCreate>,<delete_rows>,<skip_codepage_id_c heck>,<TargetCP>{,<dbf_field_name>=<mysql_field_name>} Where: <dbf_file_name> <mysql_table_name> - file name to transfer data from - table name to transfer data to

<ReCreate> le values: ructure <delete_rows> es: a transfer <skip_codepage_id_check> <TargetCP>

- Recreate MySQL table structure. Possib 0: leave table structure unchanged 1: drop table and create new trable st according to .DBF file. - empty table before data transfer. Valu 0: append .DBF data into table 1: delete all existing data before dat - Skip codepage ID check. Values: 0: Do codepage ID check in DBF file 1: Skip codepage check - Target code page. Values: 0: Current Windows codepage 1: Russian KOI-8 2: Russian MS-DOS (866) 3: OEM - associate DBF field name with mysql field name. Empty value of <mysql_filed_name> means, that field s not be transfered

<dbf_field_name>=<mysql_field_name> hould

Example of script lines: ".\db\abit.dbf", abit, 1, 1, 1, 0, lock="" db\stud.dbf, stud, 0, 1, 0, 0, "Field"="Fld" "Skip codepage ID check" EXPLANATION This is a quick hack added to fix a problem occuring with certain language settings. For instance, to make dbf2mysql translate extended Swedish characters correctly, "Skip codepage ID check" should be set to 1, and "Current Windows Codepage" should be used, provided you're working in a Swedish Windows environment. If you have trouble with strange characters showing up in your MySQL tables, experiment with these settings. PROBLEMS 1. Problem with tables contains large MEMO or GENERAL data. Don't forget to increase value of "max_allowed_packet" variable to transfer large BLOB fields. Packet size should be large enough to store INSERT query with all transfered fields data including BLOB's. The default value is 65536 bytes. See MySQL manual for details. 2. MEMO's codepage conversion. There is some difference betwen MEMO and GENERAL datatype transfering: .DBF data type MEMO GENERAL Default MySQL data type MEDIUMTEXT MEDIUMBLOB Codepage conversion As you choose in wizard No

HISTORY 1.05 Release: - Fixed MySQL string escaping (invalid escape of '%' and CtrlZ symbols) 1.04 Release: - Utility keeps leading spaces in DBF string fields. 1.03 Release: - importing now is not aborted if invalid data appears in dbf records. 1.02 Release: - batch script <ReCreate> flag bug was fixed. 1.01 Release: - "Skip codepage ID check" was added by Johan Ekenberg 1.0 Release: Fixed bug with "Date" data type transfer Fixed bug with MEMO field transfering Memo data is now searched in .fpt in .dbt files Default MySQL column types for MEMO and GENERAL are MEDIUMTEXT and MEDIUMBLOB correspondingly - Codepage for GENERAL datatype is not changing - Added TargetCP parameter in batch script - Some "cosmetic" changes

1.0 a: First available implementation

You might also like