c# - ORA-00911: invalid character? -
i'm getting following error:
ora-00911: invalid character @ xdocument doc= document.load(crtcommand.executescalar().tostring());*
with code:
using (oracleconnection conn1 = new oracleconnection(oradb1)) { conn1.open(); using (oraclecommand crtcommand = new oraclecommand("select dbms_metadata.get_sxml('view','view_tbl_a') dual;", conn1)) { xdocument doc = xdocument.load(crtcommand.executescalar().tostring()); xnamespace ns = "http://xmlns.oracle.com/ku"; if (doc.descendants(ns + "col_list_item").any(c => c.attributes().any())) messagebox.show("col_list has value"); else messagebox.show("col_list has no value"); } }
get rid of trailing semicolon.
using (oraclecommand crtcommand = new oraclecommand( "select dbms_metadata.get_sxml('view','view_tbl_a') dual", conn1))
oracle doesn't statement delimiters when passing in single statement immediate execution.
Comments
Post a Comment