Results 1 to 1 of 1

Thread: Dataset not updating

  1. #1

    Thread Starter
    Hyperactive Member aks_1610's Avatar
    Join Date
    Sep 2002
    Location
    Pune, India
    Posts
    280

    Dataset not updating

    Hi All,
    I am using following code to Read/Write XML in ASP.NET. But the resultant XML is not reflecting the changes.
    VB Code:
    1. System.Data.DataSet merchantDS = new System.Data.DataSet();
    2.        
    3. merchantDS.ReadXml(MapPath(".") + "\\Merchant.xml");
    4.  
    5. merchantDS.Tables["General"].Rows[1].ItemArray.SetValue("Anjani", 0);
    6.  
    7. if (merchantDS.HasChanges())
    8. {
    9.       merchantDS.AcceptChanges();
    10. }
    11.      
    12. merchantDS.AcceptChanges();
    13.  
    14. merchantDS.WriteXml(MapPath(".") + "\\" + txtMerchantName.Text + ".xml");

    Please find the attached XML file.
    Please help!!!
    Attached Files Attached Files
    Last edited by aks_1610; Feb 16th, 2006 at 05:42 AM.
    A man with nothing to live for has everything to fight for...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width