Migrating FoxPro accounting data without losing ledger parity

A practical method for moving FoxPro/.dbf accounting systems to a modern database — and proving the books still balance before anyone relies on them.

Author
Kamyab Engineering
Published
12 October 2026
Reading
8 min
Capability
Build

Across India, a surprising amount of business history still lives in FoxPro. Accounting and inventory applications written in FoxPro 2.x or Visual FoxPro in the 1990s and 2000s often kept running long after their developers moved on, because they worked and because nobody wanted to be the person who broke the books. Microsoft ended extended support for Visual FoxPro 9.0 in January 2015; the applications, and the data inside them, are still with us.

Migrating that data is not difficult in the technical sense. Libraries in most languages can read .dbf files. The hard part is ledger parity: being able to show, with evidence, that the migrated books say exactly what the old ones said. This article sets out the method we use.

Why “just export it” goes wrong

FoxPro tables carry assumptions that a naive export throws away.

Trap What happens What to do instead
Deleted records Each record carries a deletion flag; rows marked deleted stay in the file until the table is packed (Microsoft: table file structure). Some readers include them, some don’t. Read the flag explicitly, keep deleted rows in a separate table, and decide with the accountant whether any were ever meaningful.
Code pages The table header records a code page; text with non-ASCII characters is garbled if decoded with the wrong one. Read the code-page byte per table and decode accordingly; spot-check party names.
Memo fields Long text lives in a separate .FPT (or .DBT) file; lose that file and memo columns come back empty. Inventory every table with its memo and index companions before starting.
Numbers as text Numeric fields are fixed-width with fixed decimals. Converting to floating point and summing thousands of rows introduces rounding drift. Use exact decimal types (NUMERIC in PostgreSQL) or integer paise.
Blank dates Empty dates are blanks, not nulls; date arithmetic fails or silently defaults. Map blanks to NULL explicitly and report how many there were.
Fields that don’t mean what they say Column names reflect what a developer intended in 1996, not how the business used them later. Profile every column’s actual values before mapping it.

That last trap is the one that hurts most. In a recent migration we found that a field named GROUP — which any reasonable person would map to an accounting group — actually held geographic area names. Trusting the column name would have produced a chart of accounts that looked plausible and was wrong.

The method

1. Freeze and fingerprint the source

Take a copy of the full data directory — .dbf, .fpt, .cdx/.idx and any configuration files — and record a checksum for each file. All work happens on the copy. The checksums let you prove later that the source you reconciled against is the source you started from.

2. Extract everything, then type it

Read every table, including ones that look irrelevant, into a staging database with the original column names preserved. Only then create a typed, modelled schema (accounts, parties, branches, vouchers, voucher lines, invoices) and populate it from staging. Keeping the raw staging copy means any later question — “where did this number come from?” — can be traced back to a source row.

3. Rebuild balances, don’t copy them

Legacy systems often store running balances and opening balances in master tables. Those stored figures are exactly what you are trying to verify, so do not import them as truth. Recalculate:

  • opening balance for each account as of each financial year start, from transactions;
  • closing balances from opening balance plus period movements;
  • trial balance per branch and consolidated.

Then compare the recalculated figures with the stored ones and investigate every difference. Each difference is either a data problem in the legacy system (which the business needs to know about) or a mapping error in your migration (which you need to fix).

4. Run integrity checks the old system never did

Double-entry gives you free tests. Useful ones:

  • Voucher balance: for every voucher (branch, date, document number), debits minus credits should be zero. List every exception with its amount.
  • Orphans: voucher lines pointing at accounts that don’t exist; invoices without parties.
  • Period continuity: closing balance of year n equals opening balance of year n+1.
  • Totals by type: sales register totals match sales ledger movements; purchase likewise.

Expose these as reports rather than one-off scripts, so the accountant can run them, not just the engineer.

5. Reproduce the outputs people trust

Accountants trust the reports they have used for years: the trial balance, the ledger print, the party statement, the P&L layout. Reproduce those outputs from the new database and reconcile them, page for page, against prints from the legacy system for chosen periods. Where layout matters for statutory or audit purposes, agree the format with the accountant before building it.

6. Export for independent verification

The strongest evidence is a check you didn’t build. Exporting masters and vouchers into a widely used accounting package — in India, typically Tally Prime via its XML import — lets the client’s accountant load the migrated books into a tool they already trust and compare. Two practical notes: map legacy account codes to the target package’s parent groups deliberately (by code range, with the accountant’s sign-off), and validate every export parameter, because export endpoints that accept branch or date filters are a classic injection risk.

7. Run in parallel, then retire

Keep the FoxPro system available read-only until reconciliation is signed off. Retirement is a decision for the business, made on the evidence, not a date in the project plan. Remember that the old data must remain retrievable for as long as law and audit require — under section 128(5) of the Companies Act, 2013, companies generally preserve books of account for at least eight financial years. Check the period that applies to you with your chartered accountant.

Decision table: what kind of migration do you need?

Situation Approach
The legacy system is still in daily use and must keep working Read-only reporting layer over migrated data first; replace data entry later
Only historical data matters; operations already moved to Tally/Zoho Books Archive migration: full history into a queryable database plus export to the current package
Data must merge into a new ERP Migrate to a staging model first; reconcile; then load the ERP through its own import tools
Nobody understands the legacy data model Profiling and documentation phase before any commitment to a target

A parity checklist

  • Source directory copied and checksummed
  • Every table extracted, with deleted rows and memo fields accounted for
  • Code pages identified per table
  • Amounts stored as exact decimals
  • Opening, closing and trial balances recalculated from transactions
  • Differences from stored balances listed and explained
  • Voucher-balance, orphan and continuity checks run as reports
  • Key reports reconciled against legacy prints for agreed periods
  • Export into the client’s accounting package checked by their accountant
  • Legacy system retained read-only until sign-off

How Kamyab approaches it

Our legacy-rescue work follows this sequence: extract everything, rebuild rather than trust derived numbers, make imbalances visible, and give the accountant an independent way to check. In one recent engagement that meant 72 FoxPro tables and 110,117 records moved into PostgreSQL, with a voucher-balance integrity report, eleven accounting reports and a Tally Prime export — read the case study.

If your history is locked in FoxPro, tell us about it.

Frequently asked questions

Can FoxPro .dbf files simply be opened in Excel and re-imported?
They can be opened, but that loses deleted-record flags, memo fields, code-page information and type precision, and it does nothing to prove that balances are still correct. Treat a spreadsheet export as a viewing aid, not a migration.
How do you prove the migrated books match the old system?
Recalculate balances from transactions rather than copying stored totals, check that every voucher balances, reconcile trial balances per year and per branch against the legacy reports, and export into a current accounting package so the numbers can be checked independently.
Do we have to switch off the FoxPro system on day one?
No. The safest migrations run the new system read-only alongside the old one until reconciliation is signed off.

Related capability

Related case studies

  1. WRK-01

    Rescuing a FoxPro 2.5 accounting system — every voucher checked before anyone relied on it

    72 FoxPro 2.5 tables and 110,117 records rebuilt in PostgreSQL, with voucher-balance checks and a Tally Prime export for independent verification.

    Client
    Trading & distribution organisation
    Industry
    Trading & distribution
    Capability
    Build, Advise
    Year
    2026
  2. WRK-02

    Moving 1,300+ business mailboxes between servers — and proving none were left behind

    A 1,300+ mailbox estate migrated server-to-server, resynced in controlled waves and audited account by account: zero mailboxes behind, zero missing.

    Client
    Unicorn Infosolutions
    Industry
    Retail
    Capability
    Operate, Build, Protect
    Year
    2026
  3. WRK-03

    CleanShift: server-level WordPress security that scans the database, not just the files

    Kamyab's database-aware WordPress server security, born from a CVE-2024-28000 incident and battle-tested across hundreds of sites we host.

    Product
    CleanShift by Kamyab Infotech
    Industry
    Web hosting & WordPress security
    Capability
    Protect, Build

Tell us what you run. We’ll tell you what we’d do first.

Tell us what you run and what keeps breaking. We will map it, tell you plainly what we would change, and quote it in writing.

support@kamyab.co.inWhatsApp +91 99877 77250