Rowhouse Software

Sage 50 API · Developer guides

Last checked November 18, 2026, against Sage 50 US 2026 docs

Reading Sage 50 US data over ODBC

Sage 50 US ships a 32-bit, read-only ODBC driver: turn on outside access in Maintain Users, connect as user Peachtree with the password you set, and read tables such as CUSTOMER and JRNLHDR.

That's the whole trick. The rest of this page is the detail people usually find out the hard way. Everything here comes from Sage's own help and knowledgebase unless it says otherwise. We don't have a Sage 50 install to test on, so where we're guessing, we say so.

What the Sage 50 ODBC driver is

Sage 50 US keeps company data in a Pervasive database. Sage's setup steps call the driver Pervasive ODBC Engine Interface on a single computer, and Pervasive ODBC Client Interface on a network (Sage KB). Pervasive is now called Actian Zen, and forum posts about recent versions use that name (Sage Community Hub).

Sage pitches ODBC and OLEDB as a way for Excel, Access or "any software application that supports OLEDB or ODBC" to read company data without opening Sage 50 (Sage help). It ships with Sage 50 and costs nothing extra.

Is Sage 50 ODBC read-only?

Yes. Sage's own setup article says that once the password is set, ODBC or OLE DB gives you "read-only access to your company data" (Sage KB). To create or change records from code, the official route is the .NET SDK. We wrote that up separately: the Sage 50 US .NET SDK, plainly.

Does Sage 50 ODBC work with 64-bit programs?

Sage says no. "ODBC connections won't work with 64-bit database programs or 64-bit versions of Microsoft Excel. You'll need to use the 32-bit version" (Sage KB). A second article, from February 2024, says the same about 64-bit Excel: "Sage 50 uses a 32-bit ODBC driver" (Sage KB).

The same rule applies to your code. An ODBC driver loads inside your process, so a 32-bit driver needs a 32-bit Python, Node or .NET process. One developer on Sage's forum got around it by having a 64-bit tool launch 32-bit Excel macros, and called it "what a hassle" (Sage Community Hub). Some forum users say newer installs include a 64-bit Zen driver. Sage's docs don't say that, and we haven't tested it.

Turn on outside access: the Peachtree user name and password

Out of the box, outside access is off. Someone with admin rights in Sage 50 turns it on for each company (Sage help):

  1. Open the company in Sage 50.
  2. Go to Maintain, Users, Set Up Security, and open the Data Access/Crystal Reports tab.
  3. Under Access From Outside Sage 50, pick "With the following login information" and click Change.
  4. Enter and confirm a password.

The user name is always Peachtree. You can't pick another one. The password is a single data access password for that company, separate from anyone's Sage 50 login (Apideck calls it "a separate data-access password").

Sage's two docs disagree on the password rules. The help page says it's "limited to 8 characters and cannot be blank". The knowledgebase article, last changed March 2025, says it "must be exactly seven characters in length and contain at least one letter and one number". A seven-character password with a letter and a number fits both.

Set up the ODBC data source (DSN)

On a 64-bit Windows you have to open the 32-bit ODBC administrator, %systemdrive%\Windows\SysWow64\odbcad32.exe, not the one in the Start menu. Then on the User DSN tab, click Add (Sage KB, Sage help).

Sage 50 on the same computer

  1. Pick Pervasive ODBC Engine Interface and click Finish.
  2. Type a Data Source Name.
  3. Pick the Database Name from the list. It shows the company name as it appears in Sage 50.

Sage 50 data on another computer

  1. Pick Pervasive ODBC Client Interface and click Finish.
  2. Type a Data Source Name, and for Address, the IP address or name of the computer that holds the company data.
  3. Click Create, browse to the company's folder for the Dictionary Location, and type something unique as the Database Name.

When your program connects, it logs in as Peachtree with the data access password. Excel asks for the password twice, once when it connects and again on import (Sage help).

OLEDB works too. Instead of a DSN you point at CrystalReports.udl in the company's data folder, with the same Peachtree login (Sage help).

Which Sage 50 tables matter

Sage publishes a list of the tables you can reach "via crystalreports.udl", which is the same set Sage points ODBC users to, with a page of fields for each one (Sage help, 2026). Sage lists them as .DAT files. These are the ones most integrations start with:

TableWhat's in it
CUSTOMER.DATCustomers and prospects
VENDOR.DATVendors
JRNLHDR.DATOne row per transaction: invoices, bills, receipts, payments, orders, quotes
JRNLROW.DATThe lines and distributions of each transaction
LINEITEM.DATInventory items, despite the name
CHART.DATChart of accounts
EMPLOYEE.DATEmployees
PROJECT.DATJobs
CONTACTS.DAT, ADDRESS.DATContacts and addresses
COMPANY.DATCompany information

Some tables only exist in higher editions. The audit trail table, for one, is Premium Accounting and up. Sage also warns that not everything in Sage 50 is in these tables, and some fields need custom formulas.

How invoices are stored

There's no invoices table. A sales invoice is a header row in JRNLHDR plus its rows in JRNLROW. Here's how they fit, from Sage's field pages for journal headers, journal rows and customers:

Join customers on CustomerRecordNumber, not CustomerID. Sage says the record number never changes, while the ID can change if someone uses Change ID. And JrnlKey_Per is Sage's internal period number, which doesn't match the periods users see.

Getting several rows per invoice is a common first surprise. On an old forum thread about exactly that, a Sage team member said duplicates usually come from the join type, and a report writer said the header and row tables don't hold every column, so you add the customer and item tables (Sage Community Hub). Expect to build the invoice yourself.

Known gotchas

File locking

Sage 50 puts an exclusive lock on all of a company's files during some jobs (Sage help):

If anyone else has the company open, those jobs stop with a message that the process "requires single-user access". Sage doesn't say whether an open ODBC connection counts as someone in the company. We haven't tested it. Closing connections when you're done is the safe bet, so you don't break someone's nightly backup.

Performance and odd errors

One Sage 50 2024 user linked tables into Access over ODBC. Queries got slow, then they saw "record larger than 4k" errors and #Name? in every JrnlRow cell, while the same DSN in Excel returned all 910,000 rows. No fix was posted (Sage Community Hub). Another user on 2024.0.1 got "Cannot locate the named database you specified" because the company wasn't in the DSN's database list. That thread has no confirmed fix either (Sage Community Hub).

Versions

Sage only supports Sage 50 2026 right now. Support for 2024 ended on March 4, 2026. Sage's support table goes straight from 2024 to 2026 (Sage KB). Sage's field pages have a version switcher back to 2023, so check the one that matches your customer.

Sage 50 2026.2 added an Encrypt Company Data option under Help, Support Utilities (Sage announcement). Sage doesn't say whether it affects ODBC. We haven't tested this ourselves, so check it on an encrypted company before you rely on it.

Sage 50 Cloud

If the customer runs Sage 50 Cloud, the version Sage hosts on Azure, you can't put a DSN next to the data yourself. Sage lists seven third-party apps that work there, and anything else is a request to Sage's product team (Sage KB). The verified answer on one forum thread is plain: "The Sage Cloud cannot host any third party software applications" (Sage Community Hub).

Sage support won't help

Sage's ODBC article opens with a caution that Sage support "can't assist with third-party products". Plan on the forum and your own testing.

When ODBC is enough, and when it isn't

ODBC is enough when you only read, your code can run as 32-bit on the same network as the Sage 50 data, and you're fine joining raw tables. Reports, dashboards, a nightly copy into your own database and quick lookups all fit.

It isn't enough when you need to:

We're building a hosted API for Sage 50 US. It isn't live yet. Early access is here.

Sources

More Sage 50 developer guides

Rowhouse isn't Sage and isn't affiliated with Sage. Sage 50 is a trademark of The Sage Group plc. Quotes from Sage's docs are theirs.