如何使用Windows窗体应用程序在SQL中存储泰米尔语言 [英] How to store tamil language in SQL using windows form Application
本文介绍了如何使用Windows窗体应用程序在SQL中存储泰米尔语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hai ..我正在使用visual studio 2010. SQL Server 2008.我想将tamil输入提供给文本框,我想存储在数据库中。
我的编码:
Hai.. I am using visual studio 2010. SQL Server 2008. I want to give the tamil input to the text box and i want to store in the database.
My coding:
private void button1_Click(object sender, EventArgs e)
{
try
{
cn.Open();
SqlCommand cmd = new SqlCommand("INSERT INTO Sample(Value) VALUES (@NAME)", cn);
cmd.Parameters.AddWithValue("Name",textBox1.Text);
cmd.ExecuteNonQuery();
MessageBox.Show("Success");
cn.Close();
}
catch
{
MessageBox.Show("Error");
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
cn.Open();
da = new SqlDataAdapter("Select * from Sample", cn);
ds = new DataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
cn.Close();
}
catch
{
MessageBox.Show("Error");
}
}
我正在使用谷歌泰米尔语输入法。
如何将Tamil输入提供给文本框以及如何将其存储在数据库中。请帮助我..
I am using Google Tamil Input.
How to give Tamil input to the text box and how to store it in Database. Please Help me..
推荐答案
要在SQL服务器中存储其他语言,请检查这个
存储和检索非英语Unicode字符( SQL Server中的印地语,捷克语,阿拉伯语等)[ ^ ]
对于泰米尔语,你必须使用泰米尔语字体。检查这个
输入Tamil Word in C#.net 中的文本框[ ^ ]
To store other languages in SQL server, check this
Storing and Retrieving Non-English Unicode Characters (Hindi, Czech, Arabic etc.) in SQL Server[^]
For Tamil, you have to use Tamil font. Check this
Type Tamil Word in Textbox in C#.net[^]
stored-tamil-text-to-database [ ^ ]
并尝试将数据类型更改为nvarchar()
检查链接..
storing-tamil-text-to-database[^]
and try changing the datatype to nvarchar()
Check the link..
这篇关于如何使用Windows窗体应用程序在SQL中存储泰米尔语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文