Commerce Server General - Problem in Profile.Update(xmlData, xmlFormat)

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > April 2004 > Problem in Profile.Update(xmlData, xmlFormat)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem in Profile.Update(xmlData, xmlFormat)
Rahul

2004-04-21, 5:35 am

Hi,
I have a problem in updating a profile using Profile.Update(xmlData,
xmlFormat).
i am trying to do something like this.

DataSet profileDataSet = new DataSet();
string xmlString = profile.GetXml(ProfileXmlRetrieve.Data,
ProfileXmlFormat.ElementCentric);
StringReader stringReader = new StringReader(xmlString);
profileDataSet.ReadXml(stringReader);
profileDataSet.Tables["GeneralInfo"].Rows[0].["last_name"] = "Baker";
string xml = profileDataSet.GetXml();
profile.Update(xml, ProfileXmlFormat.ElementCentric);

Below is the error details. Help will be appreciated.

Thanks in advance
-Rahul

Invalid XML document, bad schema node name.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException:
Invalid XML document, bad schema node name.

Source Error:


Line 96: ProfileContext profileContext =
CommerceContext.Current.ProfileSystem;
Line 97: Profile profile =
profileContext.GetProfile("Rahul","UserObject");
Line 98: profile.Update(xml, ProfileXmlFormat.ElementCentric);
Line 99: DataGrid1.DataSource = ds;
Line 100: DataGrid1.DataBind();
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com