Skip to Content
0

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

Mar 30, 2017 at 09:09 AM

161

avatar image
Former Member

Hello,

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.

Thanks.

10 |10000 characters needed characters left characters exceeded
Former Member

Additionally, I am using:

- Windows server 2008 32 bit

- PHP 5.3.5

- Hana 1.00.122.08.1490178281

- Hana client IMDB_CLIENT100_120_54-10009665.SAR

0
Former Member

Hello,

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.

Cheers.

Eric.

1

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.

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

1 Answer

Lars Breddemann
Feb 26 at 11:26 PM
0

I discussed this issue in

https://stackoverflow.com/questions/38969669/why-does-sqlquery-from-sap-hana-using-rodbc-return-no-data-if-request-18-or-more/

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

Share
10 |10000 characters needed characters left characters exceeded