I have an old classic ASP application that stores information in a SQL Server 2008 database. I need to retrieve the information in a new .NET application but I am having some encoding issues.
When I look in SQL Management Studio or at the data retrieved in .NET text strings looks weird when it contain Danish characters, e.g “Øvrige” when it should have been “Øvrige”.
The ASP application uses MDAC 2.8 and the native driver with a connection string like:
Provider=SQLNCLI;DataTypeCompatibility=80;Server=.\SQLEXPRESS,1433;Database=MyDB;UID=MyUser;PWD=MyPwd
The database has a Danish_Norwegian_CI_AS collation but that does not seem to have any impact.
I must admit that I have forgotten most of my ASP skills so it may be pretty obvious.
It looks like the ASP application adds some extra encoding or something. Why does it do that?
How can I retrieve and update the information from the database in .NET?