PxPlus User Forum

Main Board => Discussions => ODBC => Topic started by: michaelgreer on November 12, 2020, 01:13:51 PM

Title: ODBC returning only 10 rows
Post by: michaelgreer on November 12, 2020, 01:13:51 PM
I have pxpsql configured on a ReHat box and can query a table just fine with

/usr/pxpsqlodbc/pxpqsql -d /infor/facts78 "select Customer_num form AR_CUST_MAST where AR_CUST_MAST.company = '01'"

and the whole table dumps. On the other hand, in both my PxPlus environment, and the one from SDSI this only returns 10 rows before generating an error 2:

open(hfn)"[odb]FACTS;AR_CUST_MAST"
READ(LFO)*,CUST$;PRINT CUST$;GOTO *SAME

Any insight here is appreciated.

Michael
Title: Re: ODBC returning only 10 rows
Post by: Devon Austen on November 12, 2020, 03:13:31 PM
If you run the PxPlus SQL ODBC driver in demo mode it is limited to returning 10 rows. If you configure the ODBC driver with a valid license it will return all of the data.

Your test with pxpsql is likely using a pxpsql configured with a valid activation while your test using DSN FACTS is likely pointing at and ODBC driver without a valid activcation.
Title: Re: ODBC returning only 10 rows
Post by: michaelgreer on November 12, 2020, 04:53:19 PM
Thanks Devon. That 10 row limit was familiar because I configured and tested before I got the license. Just wasn't sure why/how to point to the correct spot.  I will check based on your feedback.
Title: Re: ODBC returning only 10 rows
Post by: michaelgreer on November 12, 2020, 05:17:26 PM
Devon,  I checked my system and there in only one DSR configured on the unix server where our PxPlus executable is running; Unform is running on the same server, so it has no way to see other than the linux configured ODBC.  Also, debug is on. Wouldn't the log show if it is accessing in Demo mode?
Title: Re: ODBC returning only 10 rows
Post by: Devon Austen on November 13, 2020, 08:53:57 AM
What may be happening is when you run pxpsql the current directory is where the license file is found but when you run from pxplus the current directory is different and it doesn't find the ODBC license file. You can create a copy of the license file and put it in your PxPlus start directory and that should get around it. Assuming the license file has a valid serial and activation code.

With the most recent version of our ODBC we added a new DSN option InstallDir that can be specified to point at the ODBC install location so the license can be found no matter where you access the ODBC from.