我正在尝试使用oracle的ExecuteXmlReader方法,如下所示:
OracleConnection conn = new OracleConnection(connectionString);
conn.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
string query = "select xmltype('<bookstore><book>Candide</book></bookstore>') from dual;";
cmd.CommandText = query;
cmd.CommandType = CommandType.Text;
cmd.CommandTimeout = QUERY_TIMEOUT;
XmlReader reader = cmd.ExecuteXmlReader(); // <============== this is failing
System.NotImplementedException: The method or operation is not implemented.
堆栈追踪:
StackTrace = " at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteXmlReader()
at MyCompany.Test.Shared.ManagedOracle.ExecSync(String connectionString, String methodName, String query)
in v:\\MyApp\\Shared\\ManagedOracle.cs:line 52"
我不知道为什么会失败。有任何想法吗? 相同的查询在oracle开发工具中工作正常。 此外,其他方法,如ExecuteReader工作正常。 这里没有内部例外。