09-19-2017 07:35 AM - edited 09-19-2017 07:40 AM
I am experiencing the same problem as a person in this theme: (https://communities.sas.com/t5/Base-SAS-Programming/SAP-HANA/m-p/277026/highlight/true#M55574)
When I try to connect to SAP Hana database with ODBC connector using connection string in SAS DI, it throws an error:
ERROR: CLI cursor fetch error: [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;-10427 Conversion of parameter/column (3) from data type NVARCHAR to ASCII failed
This error is definitely the Unicode one, because I can’t import some columns with Unicode symbols while others are well imported.
When I connect to SAP Hana with Metadata Server, it imports all needed tables, but throws an error which is attached.
Could somebody explain step by step approach to solve this problem?
Many thanks in advance.
09-20-2017 04:51 AM
ChrisNZ, Yes I am quite sure that this driver supports Unicode transfer.
(here is the topic on SAP forum https://archive.sap.com/discussions/thread/3882688).
The problem is that SAS can't convert Unicode symbols - looks more like that, to my mind.
09-21-2017 11:22 AM
SASKiwi, My Encoding session is WCYRILIC.
I tried to change "C:\Program Files\SASHome\SASFoundation\9.3\sasv9.cfg" file to utf-8, but after relaunching SAS DI it showed wcyrillic again.
Could you tell how to change it correctly?
09-20-2017 05:07 AM
09-21-2017 11:30 AM - edited 09-21-2017 12:25 PM
My Encoding session is WCYRILIC.
I am using pass through facility (with coding) to import columns from HANA, but how to define that variables are send in SQL_WLONGCHAR?
I have only one ODBC driver that fit my needs for Hana connection.
No idea what else can I use instead.
09-21-2017 04:29 PM
I suspect you might find some answers to your problems in the NLS Guide:
You may need to check the LOCALE option as well as ENCODING.
09-26-2017 09:02 AM
SASKiwi, I tried to change encoding to UTF-8 in "C:\Program Files\SASHome\SASFoundation\9.3\sasv9.cfg" file with no effect for SAS Data Integration Studio. With proc options option=encoding; run; it showed WCYRILLIC again.
This article http://support.sas.com/resources/papers/Multilingual_Computing_with_SAS_94.pdf advises to make changes in Java font configuration files for SAS DIS.
What kind of changes should I make there (in this "C:\Program Files\Java\jre6\lib\fontconfig.properties.src" file as I understand)? I tried to find wcyrillic font anywhere there, but found nothing.
09-21-2017 06:26 PM
>My Encoding session is WCYRILIC.
You may have to switch to UTF encoding. Read the documentation that @SASKiwi pointed to.
>I am using pass through facility (with coding) to import columns from HANA, but how to define that variables are send in SQL_WLONGCHAR?
I was hoping as function such as CE_CALC would help, but it won't return type SQL_WLONGCHAR. There may be other functions to change type, or some of the supported types may not break Unicode. I don't have SAP here so can't test.
>I have only one ODBC driver that fit my needs for Hana connection.No idea what else can I use instead.
Can you use a different odbc client to ensure odbc is out of the equation?
Client, not driver.
Need further help from the community? Please ask a new question.