cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to ASE 15.7 from SQL SERVER 2016 using ODBC

former_member601727
Discoverer
0 Kudos

I'm trying to connect from SQL SERVER 2016 to a ASE 15.7 on a remote server.

For that I'm using a linked server which connects through an ODBC.

When I try to run a query i get this error:

OLE DB provider "MSDASQL" for linked server "ASE_PROD" returned message "[SAP][ASE ODBC Driver]Could not load code page for requested charset".

The ASE's charset is cp1255, and the SQL SERVER's collation is Hebrew_CI_AS.

I configured the ODBC's language configuration like so:

And the linked server's language configueation is:

Thanks for all the help,

Ofer

Accepted Solutions (1)

Accepted Solutions (1)

former_member601727
Discoverer
0 Kudos

Update,

In the end the problem was that the server itself wasn't configured with the Hebrew locale.
After I changed the system locale to Hebrew, I still don't get hebrew, instead I get arrow marks signs.
But at least now it doesn't fail and I get numeric values and English text properly.

I checked with Ribo, and I see that I do get hebrew from the ODBC, so the problem is probably somewhere on the SQL Server side.

So I don't have a definite answer for this case yet, but that's probably out of SAP's hands.

Thanks for the help.

Answers (3)

Answers (3)

dawn_kim
Contributor
0 Kudos

Hi,

If I remember right MSSQL will only take Unicode for Hebrew characters. You might want to try to use the charset Unicode and see if that works.

Thanks,
Dawn Kim

ryan_hansen
Employee
Employee
0 Kudos

Hi,

I was able to reproduce with ODBC Data Source Administrator.
move c:\sybase\charsets to c:\sybase\charsets2
DSN > Advanced >
Client charset radio button
Other = cp1255

If you select test connection does this succeed or fail with the same message?
What is your %SYBASE% environment variable set to? Does that location have the charsets folder?

If you open cmd prompt run %SYBASE%\Sybase.bat and then open MS SQL Server Manager from that window does it succeed?

Regards,
Ryan

former_member601727
Discoverer
0 Kudos

Hi Ryan,

%SYBASE% directs to C:\SAP, and that's where the charsets folder is.
When I changed the charsets folder to charsets2, and tested the connection, I got the error:

I also ran %SYBASE%\Sybase.bat, and then tried the query again on the SQL SERVER, and I saw that now I get a different error:

Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "ASE_PROD".

ryan_hansen
Employee
Employee
0 Kudos

Hi,

Did you install the full SDK for SAP ASE on the machine?
You may be missing the charsets folder.

%SYBASE%\charsets

Does this work if you use utf8 or Server Default?

Regards,
Ryan

former_member601727
Discoverer
0 Kudos

Hi Ryan,

I did install the full SDK for SAP ASE, and I have the charsets folder with a folder for cp1255.

When I switch to Server Default I get these errors:
OLE DB provider "MSDASQL" for linked server "ASE_PROD" returned message "[SAP][ASE ODBC Driver]Could not load code page for requested charset".

OLE DB provider "MSDASQL" for linked server "ASE_PROD" returned message "[SAP][ASE ODBC Driver]Client unable to establish a connection".

When I switch back to Client Charset with utf8, then it works fine, as long as I don't fetch a row with hebrew in it.
Then for each record with hebrew I get this error (And I don't get any results back):
OLE DB provider "MSDASQL" for linked server "ASE_PROD" returned message "[SAP][ASE ODBC Driver]Invalid character conversion.".

Thanks
Ofer