I am getting the above error when I execute the following code:[tt]
Imports ActiveDs
----------------
Dim Cnn As New SqlConnection(Connect)
Dim CmdEmail As New SqlCommand()
Dim RdrEmail As SqlDataReader
Dim adUser As IADsUser
Dim Email As New ArrayList()
With CmdEmail
.CommandType = CommandType.StoredProcedure
.CommandText = "sp_ActiveDirectory_s"
.CommandTimeout = 99
.Connection = Cnn
End With
RdrEmail = CmdEmail.ExecuteReader
While RdrEmail.Read
adUser = GetObject(RdrEmail.Item("ADsPath".GetType.ToString())
Email.Add(adUser.EmailAddress)
End While
[/tt]
Any ideas why? The IADsUser type is used to access Active Directory. I had to add the COM object: Active Directory Library Type to get it.
Jason Meckley
Database Analyst
WITF
Imports ActiveDs
----------------
Dim Cnn As New SqlConnection(Connect)
Dim CmdEmail As New SqlCommand()
Dim RdrEmail As SqlDataReader
Dim adUser As IADsUser
Dim Email As New ArrayList()
With CmdEmail
.CommandType = CommandType.StoredProcedure
.CommandText = "sp_ActiveDirectory_s"
.CommandTimeout = 99
.Connection = Cnn
End With
RdrEmail = CmdEmail.ExecuteReader
While RdrEmail.Read
adUser = GetObject(RdrEmail.Item("ADsPath".GetType.ToString())
Email.Add(adUser.EmailAddress)
End While
[/tt]
Any ideas why? The IADsUser type is used to access Active Directory. I had to add the COM object: Active Directory Library Type to get it.
Jason Meckley
Database Analyst
WITF