Microsoft Knowledge Base Email Alertz

KBAlertz.com: (216973) - Running a Visual Basic application using the Microsoft RDS Data Factory to access Index Server 2.0 can generate the following errors: Run-time error '-2147217887 80040e21': Errors Occurred.

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **


Community Site



We Send hundreds of thousands of emails using ASP.NET Email


ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 216973 - Last Review: December 5, 2003 - Revision: 4.1

PRB: "Errors Occurred" upon Accessing Index Server 2.0 via RDS

This article was previously published under Q216973

On This Page

SYMPTOMS

Running a Visual Basic application using the Microsoft RDS Data Factory to access Index Server 2.0 can generate the following errors:
Run-time error '-2147217887 80040e21':
"Errors Occurred."

CAUSE

This happens when Running Index Server 2.0 on Windows NT 4.0 with service pack 3.0 (or an older service pack).

RESOLUTION

To resolve this run Index Server 2.0 with Windows NT 4.0 Service Pack 4 (or beyond).

MORE INFORMATION

Index Server 2.0 was shipped (with Windows NT Option Pack 4) before the MDAC 2.0 release. As a result, Index Server 2.0 was not tested with MDAC 2.0 components when it was released. The release of Service Pack 4 for Windows NT 4.0 included some modifications that corrected the way Index Server 2.0 works with RDS 2.0 components (or later versions).

Steps to Reproduce Behavior

  1. Start a new Microsoft Visual Basic project. Form1 is created by default.
  2. Reference the following libraries from the Project/Reference menu:
    • "Microsoft ActiveX Data Objects 2.0 (or 2.1) library"
    • "Microsoft Remote Data Services 2.0 (or 2.1) library"
  3. Insert a Command Button on the form. Command1 is created by default.
  4. Insert the following code into the General Declaration section of Form1:
    Option Explicit
    Dim RS As ADODB.Recordset
    
    Private Sub DoQuery(HTTPServer As String)
    
        Dim Scope, QueryText, sSQL As String
    
        Scope = "C:\"                   ' Set the scope of the query
        QueryText = "Index"      ' Set the criteria of the query
        
        sSQL = "SELECT Filename, Path, Size, Write FROM Scope('" + Chr(34) + _
             Scope + Chr(34) + "') WHERE CONTAINS('" + Chr(34) + QueryText + _
             Chr(34) + "') > 0" ' ORDER BY Rank DESC"
    
        ' Create the recordset via the data-factory
        Data_Factory HTTPServer, sSQL
    
        ' Print out column titles
        Debug.Print "Filename", "Path", "Size", "Write"
        Debug.Print "-------------", "------", "------", "----------"
        ' Print out data
        
       Do Until RS.EOF
            Debug.Print RS("Filename"), RS("Path"), RS("Size"), RS("Write")
            RS.MoveNext
        Loop
        
        RS.Close
        Set RS = Nothing
        
    End Sub
    
    Private Sub Command1_Click()
        Dim HTTPServer As String
        Dim WebServer As String
        
        WebServer = InputBox("What is the name of your Web (IIS) Server?")
        HTTPServer = WebServer
        
        ' Execute the query
        DoQuery (HTTPServer)
        
    End Sub
    
    Public Sub Data_Factory(HTTPServer As String, sSQL As String)
        
        Dim DS As New RDS.DataSpace
        Dim DF As Object
        
        Set DF = DS.CreateObject("RDSServer.DataFactory", "http:/" & HTTPServer)
        'next line produces error (not recognizing the provider) with NT4 SP3 or before
        Set RS = DF.Query("Provider=msidxs", sSQL, adOpenDynamic)
       
    End Sub
        
    
    					
  5. Press F5 to run your project. Specify the name of your web server when prompted to do so.

APPLIES TO
  • Microsoft Data Access Components 2.0
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Windows NT 4.0
Keywords: 
kbdatabase kbprb KB216973
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please