Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting error while updating the ldap attribute through asp

Status
Not open for further replies.

mannemv

Programmer
Sep 24, 2002
1
US
i am trying to modify ldap attribute through asp program and iam doing this in two ways but no luck iam getting errors...
can anybody help me on this...
here apllied scenarios ..

Case1:
Dim conn, cmd,dte
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adCmdText = 1
Set conn = Server.CreateObject("ADODB.Connection")
Set cmd = Server.CreateObject("ADODB.Command")
conn.Provider = "ADSDSOObject"
conn.Open "ADS Provider","CN=directory manager", "Th1every"
response.write "conn:::"+conn
dte="20060725111940Z"
cmd ="update 'LDAP://bluelsdstg1.bluesnet.net:1389/OU=people,ou=bcbs,DC=bcbsa,DC=com' set bcbslastauthenticationdate='20060725111940Z' WHERE objectClass='person' and uid='mannemv'" ' Error occuring here

response.write "cmd:::"+cmd
conn.Execute(cmd)
conn.Close
ERROR DESCRIPTION::::::

Provider error '80040e14'
One or more errors occurred during processing of command.

CASE2:
Dim conn, cmd, pUser ,dte
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adCmdText = 1
Set conn = Server.CreateObject("ADODB.Connection")
Set cmd = Server.CreateObject("ADODB.Command")
Set pUser = Server.CreateObject("ADODB.Recordset")

conn.Provider = "ADSDSOObject"
conn.Open "ADS Provider","CN=directory manager", "Th1every"
response.write "conn:::"+conn
cmd = "SELECT cn,bcbslastauthenticationdate FROM 'LDAP://bluelsdstg1.bluesnet.net:1389/OU=people,ou=bcbs,DC=bcbsa,DC=com' WHERE objectClass='person' and uid='mannemv'" 'staging

pUser.CursorLocation = 3
pUser.Open cmd, conn, 1, 3
response.write "date from ldap::::::::::::::::::"+pUser("bcbslastauthenticationdate")
'pUser.Open cmd, conn, adOpenStatic, adLockOptimistic, adCmdText
pUser("bcbslastauthenticationdate") ="20060725111940Z" ' Error occuring here
pUser.Update
pUser.Close
conn.Close

ERROR DESCRIPTION::::

Microsoft Cursor Engine error '80040e21'

Multiple-step operation generated errors. Check each status value.
/login/login_verify.asp, line 179

Thanks in advance
Mannem

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top