Problem creating ADODB.command object in asp. 
Author Message
 Problem creating ADODB.command object in asp.

I'm trying to query the AD and provide a return list of
computers, locations and descriptions then jam that onto a
page so that our support staff can read the arbitrary
computer names and associate those with a user/location.

The following code snippet (and subsequent handling of the
results) runs quite well in C/Wscript and displays quite
nicely through PrimalScript. Unfortunately, when I attempt
to include these statements in an ASP page, I'm getting an
error on creating the adodb.command object (second create

Any thoughts? (Pardon me if I'm overlooking something
completely simple).

strCompDesc = ""
Set objConnection = CreateObject("ADODB.Connection") 'This
create object functions just fine
Set objCommand =   CreateObject("ADODB.Command") 'This
command fails in ASP
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
    "Select Name, Location, Description
from 'LDAP://CN=computers,DC=x,DC=y,DC=z,DC=w' " _
        & "where objectClass='computer' order by Name"  
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Timeout") = 30

Wed, 29 Jun 2005 01:51:48 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Can't create ADODB.Stream object in asp page

2. Problem sending ADODB.Command object across MTS packages !!!

3. Sending command to a FoxPro database using ADODB.Command Object

4. Using browser-side ADODB.Command object?

5. Using browser-side ADODB.Command object?

6. ADODB command object

7. ADODB.Command - ReturnValue parameter problem

8. ADODB Command Execute question/problem...

9. Using adodb command object with transferspreadsheet

10. When to use ADODB.Command Object in ADO Programming

11. Using where IN with a ADODB.Command object...

12. ADODB.Command Connection Error in MTS object


Powered by phpBB® Forum Software