inserting Turkish chars into sql server
From: Sergei Shelukhin (raven_at_at_home.domonet.ru)
Date: 03/14/05
- Next message: Sergei Shelukhin: "Re: inserting Turkish chars into sql server"
- Previous message: Siobhan: "Connection pooling and changed password issue"
- Next in thread: Sergei Shelukhin: "Re: inserting Turkish chars into sql server"
- Reply: Sergei Shelukhin: "Re: inserting Turkish chars into sql server"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Mar 2005 03:39:38 +0300
Hi.
Here's the problem.
I have ASP.NET web app and SQL Server 2k database.
In the app, there's this button handler.
string sql = "INSERT INTO Word (Word,WTranslation,Comment) VALUES
('"+txWord.Text.Trim()+"','"+txTranslation.Text.Trim()+"','"+txComment.Text.Trim()+"')";
SqlCommand cmd = new SqlCommand(sql,cn);
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
txComment.Text = cmd.CommandText;
Last line is for testing purposes.
txWord field contains Turkish characters (C with cedilla, g with breve etc).
When I submit the form, I get the right output in the comment field,
e.g. all the letters are with cedillas, breves etc. I don't know if they
(symbols) will work with ngs, but here's the query example:
INSERT INTO Word (Word,WTranslation,Comment) VALUES ('çĞ','hhh','')
Problem is that in SQL Servr database, symbols lose all their fancy
stuff and come out as standart c-s, g-s etc.
Default collation for the db is cyrillic, Word column collation is set
to Turkish but it doesn't help.
The same results are produced when I run the query from the query analyzer.
How do I fix this?
- Next message: Sergei Shelukhin: "Re: inserting Turkish chars into sql server"
- Previous message: Siobhan: "Connection pooling and changed password issue"
- Next in thread: Sergei Shelukhin: "Re: inserting Turkish chars into sql server"
- Reply: Sergei Shelukhin: "Re: inserting Turkish chars into sql server"
- Messages sorted by: [ date ] [ thread ]