How to change the text size parameter for ODBC?

I am trying to fetch data from SAP HANA; after some trials I found that there should be somewhere a 32k limit for the longer text fields. I can prove it by truncating using the TO_FIXEDCHAR() function embedded in the SQL query.

TO_FIXEDCHAR("StringVar", 32767) – working ok for 32767 or lower values
TO_FIXEDCHAR("StringVar ", 32768)“std::bad_alloc” error message for 32768 or higher values

After some internet search, I found that the text size has to be increased, but I didn’t found how to change it for my case. I am using R on a win10 machine, SAP HDBODBC driver and the latest odbc library.

Can you recommend a solution/workaround?
Thank you for your help.

Note (maybe irrelevant): I don’t experience this 32k limitation when I am using a different driver than the odbc() in the dbConnect(), for example RMariaDB::MariaDB() is working fine with longer text fields.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.