PDA

View Full Version : پیدا نکردن کلمات فارسی در جستجو



saeedhushmand
دوشنبه 02 آبان 1390, 16:12 عصر
من در فرمم یک textbox گزاشتم که هر چی توش بنویسی پیدا کنه وقتی عدد می زنم پیدا می کنه و یا انگلیسی ام بزنم پیدا می کنه ولی اگه فارسی تایپ کنم هیچی پیدا نمی کنه

roshanak_g
دوشنبه 02 آبان 1390, 16:45 عصر
کدتون رو لطف کنید بزارید تا ببینیم مشکل از چی هست.

modern_amin
دوشنبه 02 آبان 1390, 16:56 عصر
بخاطر مشکل عربی و فارسی هست
مثلا ی و ي باهم فرق دارند

saeedhushmand
دوشنبه 02 آبان 1390, 18:20 عصر
private void comboBox1_TextChanged(object sender, EventArgs e)
{
if (comboBox1.Text != "")
{
SqlDataAdapter myDA;
DataSet myDS;
StrConn = "SERVER=.;DATABASE=laberator;Integrated Security=True";
StrQury = "Select * From [tarefe sabt] Where [name tarefe]='" + comboBox1.Text + "'";
myDA = new SqlDataAdapter(StrQury, StrConn);
myDS = new DataSet();
myDA.Fill(myDS, "[tarefe sabt]");
this.dataGridView1.DataSource = myDS;
this.dataGridView1.DataMember = "[tarefe sabt]";
this.dataGridView1.AutoGenerateColumns = true;
this.dataGridView1.RightToLeft = RightToLeft.Yes;
this.dataGridView1.Refresh();
myDA.Dispose();
myDS.Dispose();
}

MiladSe7en
دوشنبه 02 آبان 1390, 18:40 عصر
باید توی شرط حرف N اضافه کنید.

Where [name tarefe]=N'" + comboBox1.Text ...

nunegandom
دوشنبه 02 آبان 1390, 19:19 عصر
این N ماله چیه؟