Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server Userprofile management > Why does update...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 256 of 267
Post > Topic >>

Why does update profile with no changes try to insert into userobject and not update it?

by philderbeast@[EMAIL PROTECTED] Mar 6, 2007 at 08:08 PM

I have found an instance where updating a profile after making no
changes is failing because the SQL that gets executed is trying to
insert a row into userobject. Why does this not perform an update?
Seems to be a bug. Platform is CS2002 with FP1 + SP4 and SQL 2000 with
SP4.

Here's the code that fails ...

ProfileContext pcTo = DestinationProfileContext;

Profile userTo = pcTo.GetProfile(
				UserObject.GeneralInfo.EmailAddress,
				emailAddress,
				UserObject.ProfileCatalog.Definition);

userTo.Update();

SQL profiled statement fragment ...
INSERT INTO "UserObject"("g_user_id","u_last_name","u_user_title", ...

Error message when I try to execute the above statement taken from the
profiler and executed in query analyzer ...
Violation of PRIMARY KEY constraint 'PK_UserObject'. Cannot insert
duplicate key in object 'UserObject'.
The statement has been terminated.
 




 1 Posts in Topic:
Why does update profile with no changes try to insert into usero
philderbeast@[EMAIL PROTE  2007-03-06 20:08:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 17:35:15 CST 2008.