2026-11-27

Sage 100 ODBC with Sage 100 v2020: Queries Fail When Sorting by CustomerNo

After upgrading to Sage 100 v2020, Excel 365 64-bit queries through the Sage ODBC driver fail whenever they sort by CustomerNo. There is no confirmed driver fix — here is what is documented and the workarounds that hold.

The setup is a common one: a client upgrades to Sage 100 v2020, and at the same time moves from Excel 2013 to Excel 365 Enterprise 64-bit. The 64-bit Sage 100 ODBC driver (ProvideX v4.40.0004) connects, and the spreadsheets' data downloads — until a query sorts. Any refresh of a query with an ORDER BY on CustomerNo fails with a Microsoft error; remove the sorting and the identical query refreshes cleanly. Queries that ran for years on the old version break on this one field behaviour.

Be clear about the state of this one: there is no confirmed fix. Sage development staff worked the report in the open, could not replicate it on their side, and took it away for investigation; no corrected driver or patch is recorded. Driver v4.40.0004 was already the current driver, so "install the update" is not an answer here. What follows is what is actually documented — the shape of the fault, the dead ends that were tested so you do not repeat them, and the workarounds that kept the reports running.

What is known

  • The fault follows the ORDER BY, not the data or the query. The failing query (AR invoice history detail joined to header, filtered by item type and invoice date range, ordered by CustomerNo, ItemCode, InvoiceDate) works the moment CustomerNo is removed from the sort — and the same queries on the same data run without error under Excel 2013.
  • It is not only CustomerNo, and not only one table. The reporter found multiple ORDER BY fields across multiple tables failing, on rebuilt files as well as live ones.
  • It is not Excel-specific. Another participant reproduced it through a SQL Server linked server on the same 64-bit driver: ORDER BY InvoiceNo worked, ORDER BY CustomerNo failed. That puts the fault in the 64-bit driver's sort handling rather than in Excel 365 — consistent with everything else reported.
  • The older Excel path is unaffected. The same queries on the same data run without error under Excel 2013, the pre-upgrade client in the documented case.

The fix — workarounds, honestly labelled

No step below repairs the driver. They are the routes the affected sites actually used:

  1. Remove the ORDER BY from the query and sort in Excel after refresh. Confirmed by the reporter: every failing query refreshes fine with the sorting removed. For most reporting spreadsheets this is the whole answer — the data arrives, and Excel's own sort does the ordering.
  2. Keep the affected workbooks on the older Excel version that works. In the documented case the identical queries on the identical data run without error under Excel 2013; sites that could not give up sorted queries kept those workbooks on the pre-upgrade Excel.
  3. Escalate to Sage with evidence. If you open a case, send the exact failing query, the connection string, the driver version (v4.40.0004), and the linked-server reproduction if you can produce it — a failure that also occurs outside Excel is much harder to route to "spreadsheet problem." Set expectations internally: Sage could not replicate the fault in the documented case, so a case may not close quickly.

What doesn't work

  • Trimming the ORDER BY. Removing InvoiceDate from the sort (a Sage suggestion, tested) changed nothing — the error persists while CustomerNo sorting remains.
  • Rebuilding the data files. Done by the reporter; the same error on the rebuilt files.
  • Hunting for bad data in CustomerNo. The evidence rules it out: several tables and several sort fields fail, and the identical data sorts fine under Excel 2013.
  • Looking for a newer ODBC driver. v4.40.0004 was confirmed current by Sage in the thread.
  • Do not confuse this with the "[ProvideX][ODBC Driver] Internal Error" error. That is a different error message with its own thread and its own remedies. None of those remedies is documented for the v2020 ORDER BY failure, and no source reports any of them fixing this one.

Affected versions

Documented on Sage 100 v2020 with the 64-bit ProvideX ODBC driver v4.40.0004, from Excel 365 Enterprise 64-bit and through a SQL Server linked server. The same queries are documented as working under Excel 2013. No other Sage 100 version is evidenced for this specific failure.

Prevention / best practice

  • When an upgrade combines a Sage version change and an Office bitness change, test the ODBC workbooks separately from the Sage upgrade itself — in this case the Sage data was fine and the break lived entirely in the new 64-bit query path.
  • Prefer queries that return unsorted data and sort in the spreadsheet; it removes a whole class of driver sort behaviour from your critical path.
  • Keep one known-good older Office install available during any 64-bit migration, so a driver fault cannot take reporting down with it.

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