Visual FoxPro Migration: Getting DBF Data Into a Modern Database

Microsoft shipped the last Visual FoxPro release (9.0 SP2) in 2007 and ended support in January 2015 — no security updates since. The data, however, is usually still business-critical: tables in .dbf files, memo text in .fpt, indexes in .cdx. This page is about moving that data into SQL Server, PostgreSQL, MySQL, Access or Excel without losing records, memo content or keys.

Why FoxPro applications get migrated

  • No security patches. Support ended in 2015. Anything that touches the network is running unpatched binaries.
  • Windows compatibility risk. 16-bit and early 32-bit components increasingly fail on current Windows builds, and the runtime has to be installed on every workstation.
  • 2 GB per table. A DBF table cannot grow past roughly 2 GB, and every user needs write access to the file share — a permanent corruption risk.
  • No remote or web access. DBF files are a file-share design; there is no server to put behind a firewall, an API or a cloud service.
  • Skills and hiring. Fewer people can maintain VFP code every year, and rewrites are cheaper when the data already lives in a current engine.

What FoxPro data actually consists of

A FoxPro "database" is not one file. Knowing which file holds what is the difference between a clean migration and a folder of orphaned tables.

FileHoldsWhy it matters
.dbfThe table itself — field definitions and rowsThis is what any migration reads. Field types, lengths and the code page live in its header.
.fptMemo and general (OLE) field contentLong text, images and binary blobs are stored here, not inside the .dbf. Skip it and memo fields arrive empty.
.cdx / .idxIndex expressions and, with .cdx, primary/foreign key rulesIndexes are not ported automatically; the target engine rebuilds them from the table.
.dbc / .dct / .dcxThe database container: long table names, triggers, RI rules, auto-increment settingsFree tables have none of this. Auto-increment and long names exist only here — a classic migration trap.

Choose the target engine

TargetGood fit whenGuide
SQL ServerWindows shop, existing AD/backup tooling, .NET or SSRS reportingFoxPro to SQL Server
PostgreSQLNo licence cost, strong correctness, Linux hosting or cloudFoxPro to PostgreSQL
MySQL / MariaDBWeb applications, LAMP stacks, cheap managed hostingFoxPro to MySQL · MariaDB
AccessSmall team that wants to stay desktop but move off DBF filesFoxPro to Access
ExcelOne-off analysis, not a live applicationFoxPro to Excel
Oracle / MongoDBStandardising on an existing enterprise platformOracle · MongoDB

The reverse direction (moving data into DBF, for example for a legacy report generator) is covered too — see SQL Server to FoxPro. Every combination of FoxPro with the other 15 supported formats exists as its own step-by-step guide under the migration library.

The migration, step by step

  1. Inventory the files. Collect every .dbf with .fpt and .cdx, and the .dbc if the app used a database container. Free tables in a folder are not the same as a DBC-bound set.
  2. Record the code page. It sits in byte 29 of each .dbf header (for example CP1252 for Western, CP936 for Simplified Chinese). This single value decides whether accented and CJK text survives.
  3. Decide the type mapping. C→VARCHAR/CHAR, N→NUMERIC/DECIMAL, F→FLOAT/DOUBLE, D→DATE, T→TIMESTAMP, L→BIT/BOOLEAN, M→TEXT, G→BLOB/BYTEA, Y→MONEY/DECIMAL(19,4), I→INT.
  4. Create the target tables — either from the wizard's proposed schema, or from your own DDL if the target has naming standards.
  5. Load the rows in bulk, then verify per-table row counts against the source.
  6. Rebuild keys and indexes in the target, and re-point the application or reporting layer at it.

Shortcut: the tool does steps 3–6 in one wizard run over a live connection — schema proposed automatically, from any DBF/CDX/FPT set into SQL Server, PostgreSQL, MySQL, MariaDB, Access, Oracle, SQLite, MongoDB or Excel. Free trial

Five things that break FoxPro migrations

  • Code page mismatch. Reading a CP1252 file as UTF-8 turns Müller into Müller. Set the source encoding before the first run; re-running afterwards means cleaning data twice.
  • Memo fields left behind. If only the .dbf is copied and the .fpt is not, memo columns arrive empty or truncated. Always keep the pair together.
  • Auto-increment lost. In VFP 8+ the counter is a database-container property, not part of the table. Migrating the .dbf alone gives you a plain integer column with no next value.
  • Empty dates. A blank FoxPro date is not NULL — it is commonly stored as 1899-12-30, which is a perfectly valid date in the target. Map it to NULL deliberately or it becomes a real record date.
  • Deleted rows. DBF keeps deleted records until the table is packed; the first byte of the row carries the delete flag. Unpacked tables migrate the deleted rows too.

FAQ

Is Visual FoxPro still supported?

No. Visual FoxPro 9.0 SP2 (2007) was the final release, and Microsoft ended support in January 2015. There have been no security updates since, which is the usual reason migrations start.

Can I migrate DBF files without the FoxPro application?

Yes. The .dbf, .fpt and .cdx files are read directly — no FoxPro runtime, no ODBC driver and no VFP installation is required on either machine.

Do long field names and table names survive?

Long names live in the .dbc database container, not in the .dbf. They can be read from the container, and the wizard lets you rename tables and fields explicitly before loading, which is usually the cleaner option.

What happens to memo and general (OLE) fields?

Memo text becomes TEXT/NVARCHAR and general fields become BLOB/BYTEA/VARBINARY. Both require the .fpt file to be present next to the .dbf.

Can I keep the FoxPro application running during the move?

You can migrate a copy and keep the old system live, then cut over once the target is verified. For a low-downtime cutover, run the migration, stop writes, run it once more, then switch the application.

What about the VFP code (forms, reports, PRG)?

Code is not data and does not migrate. Forms, reports and business logic have to be rebuilt on the target platform; this tool moves the tables, rows, keys and indexes.

FoxPro guides by target

Migrate a real DBF set before you decide

Download Free Trial »