Exemple #1
0
        public void TestGetSqlXml(TestCaseResult result)
        {
            InsertRowText();

            VirtuosoCommand cmd = connection.CreateCommand();

            cmd.CommandText = "select data from xmlt";

            VirtuosoDataReader rdr = cmd.ExecuteReader();

            rdr.Read();
            SqlXml x = rdr.GetSqlXml(0);

            FailIfXmlNotEqual(result, x.ToString(), TheXml);
        }
Exemple #2
0
        public void TestGetSqlXmlReader(TestCaseResult result)
        {
            InsertRowText();

            VirtuosoCommand cmd = connection.CreateCommand();

            cmd.CommandText = "select data from xmlt";

            VirtuosoDataReader rdr = cmd.ExecuteReader();

            rdr.Read();
            SqlXml x = rdr.GetSqlXml(0);

            XmlDocument doc = new XmlDocument();

            doc.Load(x.CreateReader());

            FailIfXmlNotEqual(result, doc.OuterXml, TheXml);
        }
Exemple #3
0
        public void TestInsertSqlXml(TestCaseResult result)
        {
            VirtuosoCommand insert = connection.CreateCommand();

            insert.CommandText = "insert into xmlt (id, data) values (1, ?)";
            insert.Parameters.Add(new VirtuosoParameter(":0", new SqlXml(TheXml)));
            insert.ExecuteNonQuery();
            insert.Dispose();

            VirtuosoCommand cmd = connection.CreateCommand();

            cmd.CommandText = "select data from xmlt";

            VirtuosoDataReader rdr = cmd.ExecuteReader();

            rdr.Read();
            SqlXml x = rdr.GetSqlXml(0);

            FailIfXmlNotEqual(result, x.ToString(), TheXml);
        }