Query result field names truncated at 30 characters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Query result field names truncated at 30 characters

Jesse Grimmer
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.

Thanks,
Jesse
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: Query result field names truncated at 30 characters

Nick Gorham-2
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.
>
> Thanks,
> Jesse

Hi,

I am certain its not unixODBC. Turn on driver manager logging and see
what length buffers php is sending to get the column names.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support