Esempio n. 1
0
        public void TestFieldCount()
        {
            SqlConnection cn = new SqlConnection(CONNECTION_STRING);

            cn.Open();

            using (SqlCommand cm = cn.CreateCommand())
            {
                cm.CommandText = "SELECT FirstName, LastName FROM Table2";

                using (Csla.Data.SafeDataReader dr = new Csla.Data.SafeDataReader(cm.ExecuteReader()))
                {
                    Assert.IsTrue(dr.FieldCount > 0);
                    Assert.AreEqual(false, dr.NextResult());
                    dr.Close();
                }
                cn.Close();
            }
        }
Esempio n. 2
0
        public void TestFieldCount()
        {
            SqlConnection cn = new SqlConnection(CONNECTION_STRING);
            cn.Open();

            using (SqlCommand cm = cn.CreateCommand())
            {
                cm.CommandText = "SELECT FirstName, LastName FROM Table2";

                using (Csla.Data.SafeDataReader dr = new Csla.Data.SafeDataReader(cm.ExecuteReader()))
                {
                    Assert.IsTrue(dr.FieldCount > 0);
                    Assert.AreEqual(false, dr.NextResult());
                    dr.Close();
                }
                cn.Close();
            }
        }