[unixODBC-support] Query result field names truncated at 30 characters
nick at lurcher.org
Sat Mar 19 10:11:59 GMT 2016
On 19/03/16 02:25, Jesse Grimmer wrote:
> This may not be an issue with unixODBC, but even then perhaps someone can offer insight.
> My environment is Ubuntu 14.04 running unixODBC version 2.2.14p2-5ubuntu5. I am running PHP (testing with both 5.6 and 7) and am accessing an AS/400 (System i) DB2 database.
> I have a query in which I am aliasing column names to more descriptive (and longer) names using SQL AS, and for all the fields which are greater than 30 characters the resultset array has truncated keys. My quick fix was to shorten the AS aliases and this is getting me by but I'd like to remove this limitation if possible.
> This same query in my Windows server environment which also uses PHP and ODBC to access the same AS/400 DB2 backend, has the full length keys.
I am certain its not unixODBC. Turn on driver manager logging and see
what length buffers php is sending to get the column names.
More information about the unixODBC-support