dash_saeid
جمعه 13 مرداد 1391, 17:16 عصر
مشکل این کد کجاس .error نمیده ولی موقعی ک میزنم update بشه پایگاه دام هیچ تغییری اعمال نمی شه. اگه مشه زودتر کمکم کنید ممنونتون می شم
string str = "Database=amlak;Integrated Security=True;server=.";
SqlConnection con = new SqlConnection(str);
con.Open();
string sql = "update malek set maname='" + TextBox1.Text + "',majens='" + DropDownList1.Text + "',stel='" + TextBox2.Text + "',htel='" + TextBox3.Text + "',email='" + TextBox4.Text + "',address='" + TextBox5.Text + "',pass='" + TextBox6.Text+"'";
SqlCommand com = new SqlCommand(sql, con);
com.Connection = con;
com.ExecuteNonQuery();
con.Close();
Response.Write("<script language='javascript'>alert(' اطلاعات با موفقیت ویرایش شد ')</script>");
string str = "Database=amlak;Integrated Security=True;server=.";
SqlConnection con = new SqlConnection(str);
con.Open();
string sql = "update malek set maname='" + TextBox1.Text + "',majens='" + DropDownList1.Text + "',stel='" + TextBox2.Text + "',htel='" + TextBox3.Text + "',email='" + TextBox4.Text + "',address='" + TextBox5.Text + "',pass='" + TextBox6.Text+"'";
SqlCommand com = new SqlCommand(sql, con);
com.Connection = con;
com.ExecuteNonQuery();
con.Close();
Response.Write("<script language='javascript'>alert(' اطلاعات با موفقیت ویرایش شد ')</script>");