This is my (rough) code (DAL):
int i; // Some other declarations SqlCommand myCmdObject = new SqlCommand(\"some query\"); conn.open(); i = myCmdObject.Exec
if you want to run an update, delete, or insert statement, you should use the ExecuteNonQuery. ExecuteNonQuery returns the number of rows affected by the statement.
How to Set Count On