PxPlus User Forum

Main Board => Discussions => ODBC => Topic started by: michaelgreer on March 25, 2020, 09:23:33 AM

Title: ODBC fail w/ Office 2016 when using ORDER BY.
Post by: michaelgreer on March 25, 2020, 09:23:33 AM
Customer is running ODBC 5.20.0002.  Recently upgraded to Office 2016. Queries ran with earlier versions of excel that contained an "ORDER BY" clause.  Now the are failing and reporting "[PxPlus][ODBC Driver][FILEIO]No data found.  When the order by is removed the query executes.  Has anyone dealt with this?
Title: Re: ODBC fail w/ Office 2016 when using ORDER BY.
Post by: Devon Austen on March 25, 2020, 09:47:16 AM
I would suggest trying a newer version of the ODBC driver as maybe you are encountering a bug that has already been fixed. There have been several bugs with order by that have been fixed. If the newer version does not resolve the issue then read on for ways to try to debug.

I have not had anyone report this exact issue. Generally the version of Excel should not make any difference. That you do see a difference makes me think that somehow a different SQL query is being generated in the newer Excel then in the older Excel. I would enable logging so you can see what the SQL query ODBC was asked to execute was. You then can compare the older Excel to the new Excel and any difference may lead you to the cause of the error.

I would also make sure you are doing the same procedure in the newer excel to execute the query as the old Excel. I would also make sure you are using the same ODBC version and DSN settings.