Sage ODBC with Sage 100 V2020

SUGGESTED

I am upgrading a client to Sage 100 V2020 and am running into issues with some Excel spreadsheets that have been working for years in prior versions of Sage 100.  In V2020 the client upgraded their Excel version from 2013 to Excel 365 Enterprise 64 bit installed locally on the server.  I installed the 64 bit Sage 100 ODBD driver and I can connect to the Sage 100 database from inside Excel using Microsoft Query and download the data to Excel.  However, if I try to sort the query by Customer No, I get a Microsoft Error when I try to refresh the query:

                                           

I have admin rights on the server that I'm running the queries on.  Every old Spreadsheet query that involves sorting by the Customer fails.  If I remove the sorting, it refreshes fine.  I'm wondering if Providex has an update ODBC driver that we need to install for Excel 365 Enterprise.  I'm using Providex ODBC driver 64 bit v4.40.0004 currently.  Any thoughts would be appreciated!  Thanks!

  • 0

    Hi, Version v4.40.0004 of the ODBC driver is current. Can you post your SQL query and I'll take a look.

    Thanks 

    John Nichols

    Sage

  • 0 in reply to jcnichols

    John, I don't think the query is the problem.  If I run the query with Excel 2013 it works fine.  If I run it with Excel 365 Enterprise 64 bit is when I get the error.  Here's the query:

    SELECT AR_InvoiceHistoryDetail.InvoiceNo, AR_InvoiceHistoryDetail.ItemCode, AR_InvoiceHistoryDetail.ItemType, AR_InvoiceHistoryDetail.ItemCodeDesc, AR_InvoiceHistoryDetail.QuantityShipped, AR_InvoiceHistoryDetail.UnitPrice, AR_InvoiceHistoryDetail.UnitCost, AR_InvoiceHistoryDetail.ExtensionAmt, AR_InvoiceHistoryHeader.CustomerNo, AR_InvoiceHistoryHeader.BillToName, AR_InvoiceHistoryHeader.InvoiceType, AR_InvoiceHistoryHeader.InvoiceDate, AR_InvoiceHistoryHeader.SalespersonNo
    FROM AR_InvoiceHistoryDetail AR_InvoiceHistoryDetail, AR_InvoiceHistoryHeader AR_InvoiceHistoryHeader
    WHERE AR_InvoiceHistoryDetail.InvoiceNo = AR_InvoiceHistoryHeader.InvoiceNo AND AR_InvoiceHistoryDetail.HeaderSeqNo = AR_InvoiceHistoryHeader.HeaderSeqNo AND ((AR_InvoiceHistoryDetail.ItemType='1') AND (AR_InvoiceHistoryHeader.InvoiceDate>=? And AR_InvoiceHistoryHeader.InvoiceDate<=?))
    ORDER BY AR_InvoiceHistoryHeader.CustomerNo, AR_InvoiceHistoryDetail.ItemCode, AR_InvoiceHistoryHeader.InvoiceDate

    If you take out the Order By CustomerNo it works on Excel 365.  Thanks for taking a look!

  • 0 in reply to amazingsol

    I cannot get the date parameter to work in Excel. Try removing the  AR_InvoiceHistoryHeader.InvoiceDate from your ORDER BY clause.

    Thanks John

  • 0 in reply to jcnichols

    John,

    I get the same error if I remove the InvoiceDate entirely from the query.  I made a new query in Excel to illustrate the problem better.  Remember, all these queries run without error in Excel 2013, just not Excel 365 Enterprise 64 bit.  This query dumps the IM_ItemCustomerHistoryByPeriod table for one fiscal year.  It works fine until I add the ORDER BY Customer_No and I get the following error:

     :

    This exact query will run without error on the same data with Excel 2013.

    Thanks!  Mark

  • 0 in reply to amazingsol

    If only the CustomerNo field causes the problem, I'd look for bad data in that field.

  • 0 in reply to Kevin M

    Kevin,

    It's not the only field that causes the problem although it seems to be only fields that I use to ORDER BY.  This occurs in multiple tables with multiple ORDER BY fields.  However, these exact queries on the same data using Excel 2013 has no problems.  I've rebuild some of the files and same error with Excel 365.

    Thanks!  Mark

  • 0 in reply to amazingsol

    I have a SQL linked server set up using the 64-bit ODBC driver, and order by InvoiceNo works, but not CustomerNo.  Odd, but this confirms the issue is not specific to Excel.  (I have no further insights).

  • 0 in reply to Kevin M

    Thanks, Kevin!  I'll pass this along to Sage.  I have a feeling they have some issues with their 64 bit ODBC driver.  Appreciate your help!  Mark

  • 0 in reply to amazingsol

    If you were not aware, above is on the Sage 100 development team.  :-)

  • 0 in reply to Kevin M

    Thanks, I was not aware.  LOL Hopefully that will speed up the discovery process!