how can check if executenonquery successful c# in command line//need check if nonaquery true ? almost return the value -1 when make execute
using (SqlConnection con = new SqlConnection(constr))
{
con.Open();
using (SqlCommand scm = new SqlCommand())
{
scm.Connection = con;
scm.CommandText = "select [BOOk_ID],[Member_id] from [borrow] where BOOk_ID="+textBox19.Text +" AND Member_id ="+textBox18.Text +"";
int h = scm.ExecuteNonQuery();
//need check if nonaquery true
if( )
{
using (SqlCommand scm2 = new SqlCommand())
{
scm2.Connection = con;
scm2.CommandText = "delete from Borrow where BOOk_ID=" + textBox19.Text + " AND Member_id =" + textBox18.Text + "";
scm2.ExecuteNonQuery();
}
}