View Single Post
 
Old June 20th, 2008, 08:38 AM
tusharkale tusharkale is offline
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tusharkale
Default

SOmehow I am not able to get it.
I have a table with two columns. tbl1 (id int, xml_doc ntext)
data is stored in xml format in (xml_doc) ntext column.
here is code which I have written

    mySqlCommand.CommandText = "SELECT TOP 1 xml_doc from tbl1";
    mySqlConnection.Open();
    XmlReader myXmlReader = mySqlCommand.ExecuteXmlReader();
    myXmlReader.Read();
      while (!myXmlReader.EOF) {
        Response.Write(myXmlReader.ReadOuterXml());

What should be my command to select xml_doc? and how do I change one of the parameter and saved it again as xml in table.

Thanks for help!