First of all, if you are connecting to (Microsoft) SQL Server , you need to use both - and not . SqlConnection SqlCommandMySqlConnectionMySqlCommand
- - ExecuteNonQuery() int, - , 0, .
int rowsAffected = command.ExecuteNonQuery();
if (rowsAffected == 0)
{
}