| Ashish Kumar [MSFT] 2004-02-07, 9:35 am |
| Hi Rahul,
You need to call Update method on the Profile object you have to update the record in the database. The Profile.Update
method is used to persist the state of the object to the underlying stores.
Profile userProfile = profileContext.GetProfile(keyName, "UserObject");
userProfile.Properties["GeneralInfo.address_list"].Value = addressGuid;
userProfile.Update();
Does this help?
--------------------
From: rahul_pawar@yahoo.com (Rahul)
Newsgroups: microsoft.public.commerceserver.general
Subject: Unable to update the addresslist in the user profile
Date: 23 Dec 2003 03:17:46 -0800
Organization: http://groups.google.com
Lines: 24
Message-ID: <41611f5b.0312230317.642e5dbc@posting.google.com>
NNTP-Posting-Host: 195.246.97.51
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1072178266 26127 127.0.0.1 (23 Dec 2003 11:17:46 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 23 Dec 2003 11:17:46 +0000 (UTC)
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-
online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
Xref: cpmsftngxa07.phx.gbl microsoft.public.commerceserver.general:12833
X-Tomcat-NG: microsoft.public.commerceserver.general
Hi,
I am not able to update the addresslist field in Userobject table
which has a reference of Address Profile type. It is behaving
strangely. When i try to add a new record in the UserObject table
using the Commerce server API's and mention the Address guid it
updates the values.. that works fine.
But if i dont set the values when i create a new profile and then on
later go on query the profile by saying
Profile userProfile = profileContext.GetProfile(keyName,
"UserObject");
and then do some thing like this
userProfile.Properties["GeneralInfo.address_list"].Value =
addressGuid;
the values is not set and inturn is not updated in the database.
This is some sort of wierd behavior it shows.
Can anybody help me out in this.
-Rahul
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the
terms specified at http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread
from which they originated.
|