c# – Russian characters from ms sql in c # applications (wpf and winForms) with installed English for non-Unicode applications

Question:

Hello! The problem is the following, it is necessary to localize several projects. There is a lot of data from the ms sql database. The database is large, initially varchar is used everywhere as text data. OleDbDataAdapter is used for reading. Collation costs Cyrillic_General_CI_AS. When changing the language for non-Unicode applications, all Russian characters turn into question marks. Is it possible somewhere by default to indicate in the application itself that you need to use the Russian language? Without extending the ToString () method, since used by Devexpress and recode every cell in the table is not an option.

Answer:

@PashaPash suggested, although not a direct solution, but requiring the least labor costs. Use SqlDataAdapter instead of OleDbDataAdapter. It does not know how to work directly with .udl, but .udl is a text file from which you can parse connection information. Thank you.

Scroll to Top