danawebas
asked on
Problems with a update statement in AD
Hello
I have a bit of a problem with LDAP - I tried google, but without luck. It's no problem to get information, but when i try to update it's getting tricky.
When i use this home made solution i get a error:
strSQL = "UPDATE 'LDAP://OU=Denmark,OU=oudo main,DC=do ,DC=domain ,DC=local' SET name = 'New Name' WHERE sAMAccountName = 'user' "
Error:
Provider error '80040e14'
One or more errors occurred during processing of command.
/from/updatesql.asp, line 13 ( Conn.Execute(strSQL) )
When i use this method, it works, but i want to connect with username and NOT commonname, it will cause troubles if there are two users with same name:
Set objUser = GetObject("LDAP://cn=Some Name,OU=Denmark,OU=oudomai n,DC=do,DC =domain,DC =local")
objUser.cn = strName
objUser.SetInfo
Im coding in ASP.
Hope there someone who can help me...
I have a bit of a problem with LDAP - I tried google, but without luck. It's no problem to get information, but when i try to update it's getting tricky.
When i use this home made solution i get a error:
strSQL = "UPDATE 'LDAP://OU=Denmark,OU=oudo
Error:
Provider error '80040e14'
One or more errors occurred during processing of command.
/from/updatesql.asp, line 13 ( Conn.Execute(strSQL) )
When i use this method, it works, but i want to connect with username and NOT commonname, it will cause troubles if there are two users with same name:
Set objUser = GetObject("LDAP://cn=Some Name,OU=Denmark,OU=oudomai
objUser.cn = strName
objUser.SetInfo
Im coding in ASP.
Hope there someone who can help me...
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.