ActiveX script to grab all users in Active Directory and tranfer to SQL Server.

Hello,

Does anyone has any idea, or information on how to write an ActiveX script to grab all the users from Active Directory and transfer it into a recordset, SQL server, etc..

Really need help.

Thank you very much.

[229 byte] By [zaboboa] at [2007-12-17]
# 1
I'm assuming that because this is a SSIS forum you are looking to use the SSIS ActiveX Script Task?

Don't do it. That task is only there for DTS 2000 migrated packages. Use a Script Task instead.

-Jamie

JamieThomson at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 2

I am using SQL Server 2000. So, I do want to use a script task, and that's what I have (code snippet):


Dim con
Dim rs
Dim FileSystem
Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set OutPutFile = FileSystem.CreateTextFile("marketing.txt", True)

set con = CreateObject("ADODB.connection")
set rs = CreateObject("ADODB.recordset")
con.Provider = "ADsDSOObject"
con.Open "Active Directory Provider"
Set rs = con.Execute("<LDAP://MyServerName/DC=MyDomain>;(objectClass=User);ADsPath;onelevel")


But when I execute I get an error message stating that table does not exist. That happens in the LDAP Provider. Any ides?

Thank you.

zaboboa at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 3
This isn't a DTS forum. Try microsoft.public.sqlserver.dts on USENET/NNTP/newsgroups/whatever they're call these days.
JamieThomson at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...

SQL Server

Site Classified