Posted on: 5/17/2013 1:09:25 AM | Views : 230

I'm trying to update 2 different table with 1 button in my web application. I'm currently using asp.net to develop my web app. I wonder if it is possible to update 2 different columns from 2 different table.
Here are my backend codes
SqlConnection connAdd = new SqlConnection("Data Source = localhost; Initial Catalog = project; Integrated Security= SSPI"); connAdd.Open(); string mySQL; mySQL = "Update LoginRegisterPoliceOfficer Set caseid ='" + lblCID.Text + "' where fullname ='" + DDLpolice.SelectedItem.Text + "'"; SqlCommand cmdAdd = new SqlCommand(mySQL, connAdd); cmdAdd.ExecuteNonQuery();
SqlConnection connAdd2 = new SqlConnection("Data Source = localhost; Initial Catalog = project; Integrated Security= SSPI"); connAdd2.Open(); string mySQLL; mySQLL = "Update Report Set handle = 'handled' where caseid='"+lblCID.Text+"'"; Go to the complete details ...