I typically create ASP files using VB Script connecting to SQL Server as follows:
strSQL = "Select * from tblEmployee"
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB.1;Password=xxxxxxx; etc.
Set rec = Server.CreateObject("ADODB.Recordset")
rec.Open strSQL, conn
I need to do the same for the LDAP server and found the following code on the web which I tried to use:
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = _
"<LDAP://dc=fabrikam,dc=com>;(objectCategory=User);Name;Subtree"
Set objRecordSet = objCommand.Execute
I get the messagerovider error '80040e37'
Table does not exist.
/dealercpc/LDAPTest.asp, line 70
I can connect to LDAP via Softerra LDAP Browser 2.6 with the following information:
Host: ssodsdev.xxxxxxx
Port:8389
base: dc=opensso,dc=java,dc=net
UserId: CN=Directory Manager
Password:xxxxxxxx
How is this information communicated to the program. Should this line:
"<LDAP://dc=fabrikam,dc=com>;(objectCategory=User);Name;Subtree"
be somehow changed to reflect the above information?
strSQL = "Select * from tblEmployee"
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB.1;Password=xxxxxxx; etc.
Set rec = Server.CreateObject("ADODB.Recordset")
rec.Open strSQL, conn
I need to do the same for the LDAP server and found the following code on the web which I tried to use:
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = _
"<LDAP://dc=fabrikam,dc=com>;(objectCategory=User);Name;Subtree"
Set objRecordSet = objCommand.Execute
I get the messagerovider error '80040e37'
Table does not exist.
/dealercpc/LDAPTest.asp, line 70
I can connect to LDAP via Softerra LDAP Browser 2.6 with the following information:
Host: ssodsdev.xxxxxxx
Port:8389
base: dc=opensso,dc=java,dc=net
UserId: CN=Directory Manager
Password:xxxxxxxx
How is this information communicated to the program. Should this line:
"<LDAP://dc=fabrikam,dc=com>;(objectCategory=User);Name;Subtree"
be somehow changed to reflect the above information?