ehsan.sunrise
سه شنبه 13 خرداد 1393, 10:11 صبح
سلام میخام با استفاده از تکس باکس مقادیر جدول ویاریش کنم ولی خطا میده اینم کدشه.
string txt = textBox2.Text;
SqlConnection con = new SqlConnection(@"Data Source=.;Initial Catalog=db_toloui;Integrated Security=True");
SqlCommand com = new SqlCommand("update kala set namekala = " + txt + "where idcod_cala = " + textBox1.Text );
com.Connection = con;
con.Open();
com.ExecuteNonQuery();
con.Close();
string txt = textBox2.Text;
SqlConnection con = new SqlConnection(@"Data Source=.;Initial Catalog=db_toloui;Integrated Security=True");
SqlCommand com = new SqlCommand("update kala set namekala = " + txt + "where idcod_cala = " + textBox1.Text );
com.Connection = con;
con.Open();
com.ExecuteNonQuery();
con.Close();