Hello everyone!
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.
I solved this problem.
I have changed encoding in sasv9.cfg files in Workspace Server directory and SASApp server directory.
Thanks for help!
Moved question to Data Management board.
This is an ODBC error message. Are you sure this driver supports unicode data?
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.
What is your SAS encoding setting? Maybe it is not set up for Unicode. Run proc options and tell us what the ENCODING option is set to.
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?
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.
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.
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.
>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.
I solved this problem.
I have changed encoding in sasv9.cfg files in Workspace Server directory and SASApp server directory.
Thanks for help!
Great to hear!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.