Re: CreateRecordset error '80004005'

From: Hilary Cotter (hilaryk_at_att.net)
Date: 08/20/04

  • Next message: anonymous_at_discussions.microsoft.com: "Re: CreateRecordset error '80004005'"
    Date: Fri, 20 Aug 2004 14:02:49 -0400
    
    

    According to your code, you will never get if strQuery<>"" to evalute to
    true.

    I think you should do this

    if sSearchString <> "" then

    -- 
    Hilary Cotter
    Looking for a book on SQL Server replication?
    http://www.nwsu.com/0974973602.html
    "Jay Swan" <anonymous@discussions.microsoft.com> wrote in message
    news:a1b301c486c4$3f6bfc10$a601280a@phx.gbl...
    > This code works fine, however the first time through the
    > code it throws the subject line error.
    >
    > It must have something to do with the following line of
    > code :
    >
    > If strQuery <> "" then
    >
    > What is the best way to trap and perform an if statement
    > on if the query box has just loaded and is empty(?)
    >
    > TIA
    >
    > Jay
    >
    >
    > <%
    > Dim strQuery   ' The text of our query
    > Dim objQuery   ' The index server query object
    > Dim rstResults ' A recordset of results returned from I.S.
    > Dim objField   ' Field object for loop
    >
    > ' Retreive the query from the querystring
    > sSearchString = Request.QueryString("search")
    > strQuery ="@all " & sSearchString & " AND NOT #path *_*
    > AND NOT #path *downloads* AND NOT #path *images* AND NOT
    > #filename *.class AND NOT #filename *.asa AND NOT
    > #filename *.css AND NOT #filename *search.html AND NOT
    > #filename *search.asp"
    >
    >
    > 'If the query isn't blank them proceed
    > 'If not isempty(strQuery) Then
    > 'Here is the issue...
    > If strQuery <> "" then
    > ' Create our index server object
    > Set objQuery = Server.CreateObject("IXSSO.Query")
    >
    > ' Set it's properties
    > With objQuery
    > .Catalog    = "CatalogName"  ' Catalog to
    > query
    > .Query      = strQuery     ' Query text
    >
    > ' What to sort records by.  I'm sorting by
    > rank [d]
    > ' which is [d]escending by how pertinent
    > Index Server
    > ' thinks the result is.  This way the most
    > applicable
    > ' result should be first.
    > .SortBy = "rank [d]"
    >
    > ' Which columns to return.  Column names
    > must
    > ' be the same as the catalog's
    > properties.  Some
    > ' of them are: contents, filename, size,
    > path,
    > ' vpath, hitcount, rank, create, write,
    > DocTitle
    > ' DocSubject, DocAuthor, DocKeywords...
    > .Columns = "filename, path, vpath, size,
    > write, " _
    > & "Characterization, DocTitle,
    > DocAuthor, " _
    > & "DocKeywords, rank, hitcount"
    > End With
    >
    > ' Get a recordset of our results back from Index
    > Server
    > Set rstResults = objQuery.CreateRecordset
    > ("nonsequential")
    >
    > ' Get rid of our Query object
    > Set objQuery = Nothing
    >
    > ' Check for no records
    > If rstResults.EOF Then
    >     Response.Write "<tr><td><p><strong>"
    > Response.Write "Sorry. No results found."
    > Response.Write "</strong></p></td></tr>"
    > Else
    > ' Print out # of results
    > Response.Write "<tr><td align='right'
    > CLASS='Body'><p><b>"
    > Response.Write "Records
    > Located :&nbsp;&nbsp;"
    > Response.Write rstResults.RecordCount
    >
    > Response.Write "</p></b></td></tr><tr><td>&nbsp;</t
    > d></tr>"
    >
    > ' Loop through results
    > %>
    >
    > <!-- <table align="right" cellpadding="0"
    > cellspacing="0" border="2" width="555">  -->
    > <%
    > NumeroMassimo=1
    > rstResults.PageSize=parGrandezzaPagina
    > NumeroMassimo=cint(rstResults.PageCount)
    > rstResults.AbsolutePage=parQualePagina
    >
    > Do While Not rstResults.EOF and
    > parQuantiRecord < rstResults.PageSize
    > %>
    > <TR>
    >         <TD CLASS="Body"><b><% Response.Write
    > rstResults.Fields("doctitle")%>&nbsp;</b></TD>
    >     </TR>
    >     <TR>
    >         <TD CLASS="Body"><p><% Response.Write
    > rstResults.Fields("Characterization")%></p></TD>
    >     </TR>
    > <TR>
    > <TD CLASS="Body"><A
    > CLASS="BodyLink" HREF='<% Response.Write rstResults.Fields
    > ("vpath") %>'>See more</A><A
    > HREF='/en/countries/asia/indonesia.html'
    > CLASS='BodyArrow'>>></A></TD>
    > </TR>
    > <tr><td>&nbsp;</td></tr>
    >     <%
    > i=i+1
    > rstResults.MoveNext
    > strRecordInQuestaPagina =
    > strRecordInQuestaPagina + 1
    > parQuantiRecord=parQuantiRecord+1
    >   Loop
    > End If
    > Set rstResults = Nothing
    > %>
    >
    

  • Next message: anonymous_at_discussions.microsoft.com: "Re: CreateRecordset error '80004005'"

    Relevant Pages

    • Re: CreateRecordset error 80004005
      ... >> on if the query box has just loaded and is empty ... >> Dim objQuery ' The index server query object ... >> ' Get a recordset of our results back from Index ...
      (microsoft.public.inetserver.indexserver)
    • RE: Using Index Server
      ... simple query ... >' The logo for the form is named is2logo.gif. ... > ' If there is a title, display it, otherwise display ... >Microsoft Application Center & Index Server Support ...
      (microsoft.public.inetserver.indexserver)
    • RE: 2003 Index Server - ignoring scopes error?
      ... ' *** Modifying the Form's Search Scope. ... ' *** Modifying the Number of Returned Query Results. ... Microsoft Application Center & Index Server Support ...
      (microsoft.public.inetserver.indexserver)
    • RE: indexing custom properties in w2003
      ... After you cached the custom properties, did you stop and start the index ... 185985 Using Index Server to Query and Display META TAG Information ... Microsoft Application Center & Index Server Support ... | - index server catalog referencing a website. ...
      (microsoft.public.inetserver.indexserver)
    • RE: How can I make this more efficient? (combining DataSet results with the results of a DB lookup.)
      ... generqted via some query from index server. ... may have some additional data/fields in database, ... Before you loop the first Dataset/DataTable(generated from index server ... database Primary Keys and my application parses those keys out. ...
      (microsoft.public.dotnet.framework.aspnet)