6
Answers

What is wrong with this one

durga prasad

durga prasad

15y
5.3k
1
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
Answers (6)