2026-11-27

Sage 100: [ProvideX][ODBC Driver] Internal Error

Getting [ProvideX][ODBC Driver] Internal Error in 64-bit Excel against Sage 100? Fix the connection string, drop SOTAMAS90 and set the cache to 0 today.

Your Excel query against Sage 100 has worked for months, and now refreshing it returns:

[ProvideX][ODBC Driver] Internal Error

The pattern is specific. It shows up in 64-bit Excel, against large history tables such as IM_ItemTransactionHistory, through Microsoft Query. The same workbook refreshes happily in 32-bit Excel. Rebuilding the data files does not help, reinstalling the ODBC driver does not help, and — maddeningly — the query occasionally succeeds, which sends everyone chasing data corruption that is not there.

The data is almost certainly fine. The problem is the connection string your workbook is carrying.

The fix

  1. Open the workbook and edit the query's connection string directly. Do not rely on changing the DSN in the ODBC administrator — Excel uses the string saved inside the workbook, which may be years old.
  2. Replace DSN=SOTAMAS90 with a direct driver reference: driver={MAS 90 4.0 ODBC Driver}, followed by your Directory, Prefix and ViewDLL paths.
  3. Set the cache value in the string to 0 (CacheSize / Cache=0). The default value of 4 is implicated in this failure on large tables, and zeroing it has cleared the error for site after site.
  4. If the string contains the Client/Server ODBC parameters RemotePVKIOHost and RemotePVKIOPort and you do not specifically need Client/Server ODBC for this query, remove them. In controlled testing, removing just those two parameters made the failing 64-bit query work.
  5. Save the workbook, close Excel completely, reopen it, and refresh. Closing matters: a workbook edited in place can keep using the string it started with.
  6. Repeat for every workbook that queries large history tables. Each file carries its own saved string, so fixing one fixes exactly one.

If you are rebuilding these reports anyway, consider moving them to Power Query. In practice, Power Query did not produce the internal error against Client/Server ODBC where Microsoft Query did, and it ran the same queries noticeably faster — faster still when the date-range criteria were written into the source SQL rather than applied afterwards.

What causes it

The SOTAMAS90 DSN trap

SOTAMAS90 is a convenience DSN that Sage 100 rewrites every time the program starts, and its values stay in place until another workstation launches Sage. Build a workbook on it and you have built on ground that moves: the directory, cache and server values in effect when the query was created get frozen into the workbook, while the live DSN keeps changing underneath it. With more than one Sage 100 version in the building, the values can point at a different installation entirely. Referencing the driver directly, with explicit paths, removes the moving part.

Client/Server ODBC on large tables in 64-bit Excel

Testing isolated this combination cleanly: 32-bit Excel handled large history tables with Client/Server ODBC on or off, while 64-bit Excel failed against the same tables with Client/Server ODBC parameters present in the string. It also explains the intermittency. A query created while Client/Server ODBC was enabled keeps those parameters in its saved string forever, so the same workbook can behave differently from a freshly created one on the same machine, and a user can swear they turned Client/Server ODBC off — they did, in the DSN, just not in the file.

The cache setting

Later experience added a simpler culprit: a cache value of 4 in the connection string. Changing it to 0 resolved the identical error on large history queries, including on a Standard installation with no Client/Server ODBC involved, and on versions as late as 2024. Because the SOTAMAS90 reset restores its own values at each Sage launch, a cache change made only in the DSN does not survive — another reason the fix belongs in the workbook's own string, pointed at the driver directly.

What it is not: bad dates or a bad field

The usual first suspect for ODBC failures is a corrupt date in the file. Here it was tested thoroughly and ruled out: enabling the Null Date option on the driver, adding EnforceNULLDate=1 to the string, and running the CheckDate utility all came up empty. Stripping the query down column by column was equally inconclusive — the failure followed the connection, not any particular field. If your dates check out clean, stop rebuilding files and fix the string.

Affected versions

First documented on Sage 100 2019 (driver builds 6.10.0 and 6.10.5.0), with the same behaviour reported in v2023 and v2024. The ingredients are 64-bit Excel or Power Query, the Sage 100 ODBC driver, and large history tables — Inventory Management and Payroll history are the usual victims simply because they grow the biggest.

If the fix doesn't work

Work the isolation steps in order. Test the connection from C:\Windows\System32\odbcad32.exe using the DEBUG tab so you know the driver itself connects. Cut the query down to the table's key field only; if the smallest possible query still fails, the field content is exonerated and the connection is guilty. Try restarting the Client/Server ODBC service if you run it. And test the identical workbook on a 32-bit Excel install if one exists in the building — a clean run there confirms the 64-bit connection diagnosis and gives your users a working path while you rebuild the strings.

Prevention

  • Standardize every Sage 100 workbook on a direct driver connection string with Cache set to 0. Keep the approved string in a document your report builders copy from.
  • Never let a production report depend on SOTAMAS90.
  • When a workstation moves from 32-bit to 64-bit Office, retest every Sage-connected workbook that week — this error waits quietly until someone refreshes at month-end.
  • Prefer Power Query for new Excel reporting against Sage 100.

Related help

Still stuck? Send us a screenshot of the error, we will diagnose it for free.

Digit Masters has supported Sage 100 and Sage 300 since 1997. Send the screenshot through our contact page or to contact@digitmasters.com, or call (800) 965-4262.

Ready to Optimize Your Sage ERP?

Speak with a CPA-led Sage consultant. Free initial consultation — English or Chinese.

Get a Free Consultation