بله حتما.
ببینید من میدونم یه کاری رو انجام ندادم.
آخه تنها کاری که کردم این بوده که فایل .mdf رو ضمیمه کردم و دسترسی فول دادم.
این وسط کانکشن استرینگ که داشتم چی میشه؟!!!
کد مربوط به دکمه ویرایش :
try
{
SqlConnection cnc = new SqlConnection(ConfigurationManager.ConnectionStrin gs["c"].ConnectionString);
SqlCommand cmd = new SqlCommand("UPDATE student SET stname=@stname,stfamil=@stfamil,stfather=@stfather ,stmadrese=@stmadrese,stsen=@stsen,stmeli=@stmeli, sttell=@sttell,stdate=@stdate,stadress=@stadress WHERE stid=@stid", cnc);
cmd.Parameters.AddWithValue("@stname", textBox6.Text);
cmd.Parameters.AddWithValue("@stfamil", textBox2.Text);
cnc.Open();
cmd.ExecuteNonQuery();
cnc.Close();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}