SQL server 2000 , how to save Danish data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI all

I am working on Denmark Project, where I need to save Danish data to SQL server 2000 Database. When I am trying to save Danish Data, it is having some special Characters, it is getting converted to english characters.

eg:character 'ø' is getting saved as 'o

How can we avoid this

Thanks in advance. Eary help appreciated

Thanks
EJ
 
HI

I want to some more info

Also I am using Stored Procedure to Save the data. My application is developed using .NET, ASP.NET and C# using ADO.Net. I tried to insert the data using Stored Procedure by passing Danish Chars directly in the parameter in query analyzer. But the inserted data had changed English char from danish char

So I think we need to take careof this in Stored Procedure as well as table

Please guide me how to resolve this problem

Thanks
EJ
 
ej1006 said:
I want to some more info.

Also I am using Stored Procedure to Save the data. My application is
developed using .NET, ASP.NET and C# using ADO.Net. I tried to insert
the data using Stored Procedure by passing Danish Chars directly in
the parameter in query analyzer. But the inserted data had changed
English char from danish char.

So I think we need to take careof this in Stored Procedure as well as
table.

Please guide me how to resolve this problem.

First, check that the type of your column is NVarChar, not VarChar.
Then have a look at

http://www.pobox.com/~skeet/csharp/debuggingunicode.html
 
Thanks for Jon's quick response!

Hi EJ,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that your Danish character were changed to
English when saving to SQL server database. If there is any
misunderstanding, please feel free to let me know.

I agree with Jon's suggestion that you have to check the column type of
that field first. It has to be NVarchar or NChar, because N stands for
Unicode encoded characters. You can also check the parameters (if you are
using parameters to pass values.) to see if they are also using NVarChar or
NChar.

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi,

Thanks for the early response

I changed both the parameter type in Stored Procedure and Field type in table to nvarchar. But still i am having same problem.

what could be the problem and also the solution, also i have one more query, how can I change SQL server from CaseSensitive to Caseinsensitive

Thanks
E
 
ej1006 said:
Thanks for the early response.

I changed both the parameter type in Stored Procedure and Field type
in table to nvarchar. But still i am having same problem.

Have you read through the page I provided a link for, and gone through
all the suggested tests? If so, what are the results?
what could be the problem and also the solution, also i have one more
query, how can I change SQL server from CaseSensitive to
Caseinsensitive?

What do you want to be case-insensitive about it?
 
HI

Yes, went through the link, but it did not helpme put

I want to know hpw to change a database from casesentive to case-insensitive in general, not related to above problem. I have SQL server 2000 installed, where suddenly the database has become Case-senstive

Thanks
E
 
ej1006 said:
Yes, went through the link, but it did not helpme put.

So how did the tests go? What happened when you tried from a simple
console application, etc?
I want to know hpw to change a database from casesentive to
case-insensitive in general, not related to above problem. I have SQL
server 2000 installed, where suddenly the database has become
Case-senstive.

What do you mean by "case-insensitive in general" though? You should
probably look at the collation of the database - but if that doesn't
help, ask in a SQL Server group, as they're more likely to know there.
 
Hi Jon

It works fine now. I had not made the changes inside the code where parameters were added

Thanks a lot

EJ
 
Back
Top