What is wrong with this one
Hi,
What is wrong with this one
SqlConnection con = new SqlConnection("Server=.\\SQLExpress;Database=patient;uid=sa;pwd=;");
String Query;
Query = "Delete from PatientRecords where PatientID='" + TextBox1.Text + "'";
SqlCommand sqlcmb = new SqlCommand();
con.Open();
sqlcmb.Connection = con;
SqlTransaction sqltran;
sqltran = con.BeginTransaction();
sqlcmb.Transaction = sqltran;
sqlcmb.CommandText = Query;
sqlcmb.ExecuteNonQuery();
Thanks in Advance,
A.Durga Prasad