User Profile Management - Why does update profile with no changes try to insert into userobject and not update i

This is Interesting: Free IT Magazines  
Home > Archive > User Profile Management > March 2007 > Why does update profile with no changes try to insert into userobject and not update i





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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

2007-03-07, 1: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.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com