为了增加代码的通用性,购物网定义了一个数据库访问公共类DBClass,以下是该类的一个方法,请回答该方法中语句: myCmd.Connection.Open();实现了什么功能? public int ExecNonQuery(SqlCommand myCmd) { try { if (myCmd.Connection.State != ConnectionState.Open) { myCmd.Connection.Open(); } int irst = myCmd.ExecuteNonQuery(); return irst; } catch (Exception ex) { throw new Exception(ex.Message, ex); } finally { if (myCmd.Connection.State == ConnectionState.Open) { myCmd.Connection.Close(); } } }