Skip to Content

HANA ODBC issue from PHP - not all rows are retrieved when a specific column is selected

Mar 30, 2017 at 09:09 AM


avatar image
Former Member


I am using PHP and 32 bit ODBC to query Hana db. I have a strange behaviour. In Hana studio, a query returns 52 rows. When I run the same query from my PHP script, it retrieves zero rows. I tried to comment each column one by one in my sql and it retrieves well the 52 rows when I comment column named 'output'. When looking into this column values, I see some special Slovene characters used in user names. Is there a specific parameter which prevents to load these special characters ?

Any help is welcome.


10 |10000 characters needed characters left characters exceeded
Former Member

Additionally, I am using:

- Windows server 2008 32 bit

- PHP 5.3.5

- Hana

- Hana client IMDB_CLIENT100_120_54-10009665.SAR

Former Member


I found the recommendation to use the following extension to the ODBC connection string:“CHAR_AS_UTF8=true”.

It solved my problem.

I hope it will also help others.




Hi Eric,

Could you please show us the example of the code in PHP on how to use the connection ODBC with the parameter CHAR_AS_UTF8=true please.

Thanks a lot.

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lars Breddemann
Feb 26 at 11:26 PM

I discussed this issue in

The mentioned CHAR_AS_UTF8=true parameter needs to be set at the ODBC DSN, not in the client program code.

10 |10000 characters needed characters left characters exceeded