Microsoft KB Archive/299723

= PRB: Error Occurs When You Submit a Profile if SAMACCOUNTNAME Is Not Set and the Profile Aggregates Between SQL Server and Active Directory =

Article ID: 299723

Article Last Modified on 10/22/2003

-

APPLIES TO


 * Microsoft Commerce Server 2000 Standard Edition
 * Microsoft Commerce Server 2002 Standard Edition

-



This article was previously published under Q299723



SYMPTOMS
When you call the createprofile method of the profileservice by using a site that aggregates a profile across Microsoft Active Directory and SQL Server, you may receive the following error message when the update is performed:

(-2147016657 0000207C: AtrErr: DSID-031905FA, #1: 0: 0000207C: DSID-031905FA, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 900dd (sAMAccountName).



CAUSE
The sAMAccoutName property is specific to Active Directory. This property is not automatically set by the profile system.



RESOLUTION
Change your code so that the sAMAccoutName property is set before you perform the update.



MORE INFORMATION
The following sample code is an example of how to resolve this problem in Visual Basic: Private Sub Command1_Click username = Text1.Text Dim appcfg As New appcfg Dim ps As New ProfileService appcfg.Initialize (&quot;supplierad&quot;) Set optdict = appcfg.GetOptionsDictionary(&quot;&quot;) Connstr = optdict.s_ProfileServiceConnectionString ps.Initialize Connstr, &quot;Profile Definitions&quot; Set Newprofile = ps.createprofile(username, &quot;UserObject&quot;) Newprofile.GeneralInfo.user_security_password = &quot;Password&quot; Newprofile.GeneralInfo.User_Type = 1 Newprofile.ProfileSystem.sam_account_name = username Newprofile.ProfileSystem.user_account_control = CLng(512) Newprofile.Accountinfo.account_status = 1 Newprofile.Accountinfo.date_registered = Now Newprofile.BusinessDesk.partner_desk_role = 1 Newprofile.Update Set Newprofile = Nothing End Sub

Additional query words: plutonium

Keywords: kberrmsg kbprb kbpending KB299723

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.