Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Servers > Internet Information Services
|
Internet Information Services Limit this to IIS questions and posts. ASP/ASP.NET questions should still go in the ASP/ASP.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Internet Information Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 29th, 2006, 12:35 AM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent help! Index Server Query returns 0 records

Hello,

I'm trying this code written in VB Script and its returning 0 records, inspite there are records. When I query the index server directly, I get records, but with this code i get 0 records. Can someone help?

Thanks in anticipation,
Rakesh


      Dim ixQuery ' Index Server query object.
      Set ixQuery = CreateObject("ixsso.Query")
      If (Err.Description <> "") Then
        MsgBox err.Description
      End If
      ixQuery.Columns = "filename,rank"
      ixQuery.SortBy = "rank[d]"
      ixQuery.Query = "Agreement"
      ixQuery.Maxrecords = 1000
      ixQuery.Catalog = "query://coiw2ptidbdev/system"

Dim util
      Set util = CreateObject("ixsso.Util")
      util.AddScopeToQuery ixQuery, "/", "deep"
      If (Err.Description <> "") Then
            MsgBox err.Description
      End If

      ' Run the query (i.e. create the recordset).
      Dim queryRS
      'Set queryRS = CreateObject("ADODB.Recordset")
      Set queryRS = ixQuery.CreateRecordSet("nonsequential")

      ' Check the query result. If it timed out or return no records, then show
      ' an appropriate message. Otherwise, show the hits.
      If (Err.Description <> "") Then
        MsgBox err.Description
      Else
         If queryRS Is Nothing Then
            MsgBox "No records found"
         ElseIf (ixQuery.QueryTimedOut) Then
            MsgBox "Query Timedout"
         ElseIf ( queryRS.EOF or queryRS.BOF or queryRS.RecordCount <= 0 ) Then
               msgbox cstr(queryRS.RecordCount)
            'MsgBox "No Matches found"
         Else
            queryRS.PageSize = rowCount
            MsgBox cstr(queryRS.PageSize)
            If (Err.Number <> 0) Then
               MsgBox "Record Display Error: " & Err.Description
            End If
         End If
      End If





Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - SQL query returns nothing from MySQL Calligra Access VBA 6 September 19th, 2007 04:10 PM
SQL Query returns error Raphasevilla Access VBA 2 February 22nd, 2006 08:30 AM
Check if query returns results marcin2k Access VBA 10 December 9th, 2005 02:05 PM
RecordCount Query returns EOF and BOF jigs_bhavsar Pro VB Databases 3 November 11th, 2004 09:32 AM
Problem with Index server Query MurthyGarimella VS.NET 2002/2003 0 July 7th, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.