Why does update profile with no changes try to insert into userobject and not update i
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > User Profile Management > Why does update profile with no changes try to insert into userobject and not update i




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Why does update profile with no changes try to insert into userobject and not update i  
philderbeast@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-07-07 06:26 AM

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.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:39 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register