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.