Hi Everyone!

I have to make a forum with MS SQL, and, as I'm Hungarian, we use characters, like áéíőúű, etc. Now, if I insert a text with the letter ő or ű, I get back o and u. How can I solve this problem?

The users write posts in an aspx website, by a textbox. I use this code in the insertcommand:

@"INSERT INTO Forum2 (Sorszám, Idő, Feladó, Üzenet) VALUES (" + GridView1.Rows.Count + ", '" + DateTime.Now + "', '" + namebox.Text.ToString() + "', '" + @message.Text.ToString() + "')";

Oh, and is there any way to count an SQL database's rows? That way, I could allow paging..

Thank you!

Recommended Answers

All 2 Replies

row count is easy, just use

select count(*) from table

what is the character set of the db?

1,You must set the table field which use unicode characters with nvarchar type.

2,In dot net program environment , save the page as utf-8.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.