از اینکه میگه داده ها رو وسط نشون میده متوجه نمیشم.!!
در ضمن وقتی این زرد میشه یک لحظه صبر کنی یه کادر بهت نشون میده که توش ارور رو نوشته. باید ارور رو بدی تا ببینیم مشکلش چیه..
اینجوری بنویسش
SqlConnection cn = new SqlConnection(); SqlCommand cm = new SqlCommand();
try
{
cn.ConnectionString =
@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Dbvarzesh.mdf;Integrated Security=True;User Instance=True";
string CmdText ="INSERT INTO tolidlavazemotajhizatvarzeshe (id,nv,mfaliyat,nm,web,email,ostan,shahr,neshani,t el,facs,mahsol,saltasis,sabt,iso,hamrah)VALUES('" +
textBox1id.Text + "','" + textBox2nv.Text + "','" + textBox3faaliyat.Text + "','" + textBox4nm.Text +
"','" + textBox5web.Text + "','" + textBox6email.Text + "','" + textBox7ostan.Text + "','" +
textBox8shahr.Text + "','" + textBox9neshani.Text + "','" + textBox10tel.Text + "','" +
textBox11facs.Text + "','" + textBox12mahsol.Text + "','" + textBox13sal.Text + "','" +
textBox14sabt.Text + "','" + textBox15iso.Text + "','" + textBox16hamrah.Text + "')";
cm=new SqlCommand(CmdText,cn);
cn.Open();
cm.ExecuteNonQuery();
MessageBox.Show("Done...");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
cm.Dispose();
cn.Dispose();
cn.Close();
}