Can't update LDAP with variable

R

Radtherapy

I am running Access 2007 with Windows Server 2003, Exchange 2007. When
trying to update a custom attribute, I get an automation error if I use the
variable name, but if I put the value in it's place it will work.

Here's the script:

Dim objUser As Object
Dim rstRecordset As Recordset
Dim strID As String
Set rstRecordset = CurrentDb.OpenRecordset("Select * from tblEmployeeList
where UserID = 'xxx'", dbOpenDynaset, dbSeeChanges)
strID = rstRecordset!EmpID
Set objUser = GetObject _
("LDAP://loki/cn=
xxx,ou=Users,ou=ITSupport,ou=Corporate,ou=xxx,dc=xxx,dc=local")
objUser.Put "extensionAttribute1", strID
' (**** If I change strID to an actual value, it will write, otherwise I get
an automation error on the previous line)
objUser.SetInfo


Any help is appreciated - I am too frustrated to look at this any longer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top