Skip to Content
avatar image
Former Member

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


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.


Add comment
10|10000 characters needed 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.

  • Get RSS Feed

1 Answer

  • Feb 26, 2018 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.

    Add comment
    10|10000 characters needed characters exceeded