04-21-04 10: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"] = "Ba
ker";
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();
[ Post a follow-up to this message ]
|