Hello. It is required to create xml and write not the data but the xml file itself into the Oracle table. I read that to store the file in the table there are types of clob or xmltype. Created a table with this field. And the problem is loading the file there directly with the code.
String str = "D:\\file.xml"; XmlTextWriter textWritter = new XmlTextWriter(str, Encoding.UTF8); textWritter.Formatting = Formatting.Indented; textWritter.WriteStartDocument(); textWritter.WriteStartElement("NAME"); textWritter.WriteString(TextBox1.Text); textWritter.WriteEndElement(); textWritter.Close(); This is the creation of an xml file. And this is how I try to add it to the table.
con.Open(); OracleCommand com = new OracleCommand("insert into test3 (name) VALUES ('" + textWritter + "')", con); com.ExecuteNonQuery(); con.Close(); But as I understand, textWritter does not contain the file itself. What do I need to substitute values ​​instead of what would be the file written in the table. Thanks in advance.