ActiveX-Component can't build object: 'ADODB.Command'

ActiveX-Component can't build object: 'ADODB.Command'

Post by Florian Erfurt » Fri, 15 Mar 2002 20:18:41

I wrote a VisualBasicScript, which shows all name and phonenumber of users.
As vbs-File, it works fine. I want to implement it into XML-Page. When I
want run it with Internet-Explorer, a error come up:

Line:         57
Character:    2
Fault:      "ActiveX-Component can't build object: 'ADODB.Command'
Code:       0

What is wrong here?

Thanx a lot!

cu Floh;)

My SML-SourceCode:

<reference object="ActiveDs.ADSystemInfo"/>
<reference object="ActiveDs.WinNTSystemInfo"/>
<reference object="ActiveDs.IADsContainer"/>
<reference object="ActiveDs.IADsUser"/>
<Job id="CreateContactWithADSI">
<script language="VBScript">

Option Explicit

Dim Con, ocommand 'ADO-Connection
Dim root, sDomain, sADsPath 'root, Domain & Pfad fr Active Diretory
Dim sFilter, sAttribsToReturn, sDepth 'Parameter fr die Suche
Dim rs 'unsortierte Suchergebnis
Dim strText 'String
Dim dLastLogin 'Letzte Login
Dim Domain, User 'LPAD
Dim i, j, x 'Z?hler
Dim DebugVar 'Debugvariable
ReDim FullName(4), TelephoneNumber(4), LastLogin(4) 'Array fr Ergebnis


 On Error Resume Next
End If

'Create ADO connection object for Active Directory
 Set Con = CreateObject("ADODB.Connection")
 If (Err.Number <> 0) Then
  BailOnFailure Err.Number, "on CreateObject"
 End If

 Con.Provider = "ADsDSOObject"
 If (Err.Number <> 0) Then
  BailOnFailure Err.Number, "on Provider"
 End If

 Con.Open "Active Directory Provider"
 If (Err.Number <> 0) Then
  BailOnFailure Err.Number, "on Open"
 End If

'Create ADO command object for the connection.
 Set ocommand = CreateObject("ADODB.Command")    '<--- That ist line 57
 If (Err.Number <> 0) Then
  BailOnFailure Err.Number, "on CreateObject"
 End If