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); }
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); }
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); }