Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Charset cp850 Sybase ASE - ADO.NET

Hi!

I am developing an asp.net mvc application that connects to Sybase. The data in the database are in Spanish, with accents and character 'ñ'. When I retrieve data through ado.net connection, these characters are not interpreted correctly. The connection to the database is:

<connectionStrings>

    <add name="database" connectionString="Data Source='192.168.0.1';Port='5000';UID='sa';PWD='';Database='test';CharSet='cp850';" />

</connectionStrings>

It is assumed that the charset that I use is cp850. The database by default uses this charset.

I have read that a user has used the connection parameter KeepOrgMultibyte=1, but does not work me.

Thank you for you help

Former Member
replied

Hi,

Okay, so this is the situation, you have a special character that is not part of the CP850 English charset. I am also assuming that this data is in a char or varchar column versus a unichar or univarchar column. The ASE is storing this as ??? or if you look at the binary it will 0A for the first digit since this is a character not of that charset.

For the driver to read it right you have to use KeepOrgMultibyte since the ASE has it stored funky.

It truly is a workaround until they upgrade the ASE to an appropriate charset or fix the column type. Usually this data is from years and years of information and it makes it hard for companies to change because the data needs to restored correctly, etc.
Since most companies are global you are more likely to see a utf8 charset as default now a days so you don't run into these issues. 

I am just glad upgrading the driver made it so you can at least use the workaround.

Thanks,
Dawn Kim

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question