Server Variables


Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.


The following example shows how the QUERY_STRING or form variables can be parsed from VBScript without the SetQueryFromURL method.

    NewQuery = FALSE
    UseSavedQuery = FALSE
    SearchString = ""
    if Request.ServerVariables("REQUEST_METHOD") = "POST" then
        SearchString = Request.Form("SearchString")
        SortBy = Request.Form("SortBy")
        Colset = Request.Form("ColChoice")
        Catalog = Request.Form("Catalog")
        ' NOTE: this will be true only if the button is actually pushed.
        if Request.Form("Action") = "New Query" then
            NewQuery = TRUE
        end if
    end if
    if Request.ServerVariables("REQUEST_METHOD") = "GET" then
        SearchString = Request.QueryString("qu")
        SortBy = Request.QueryString("so")
        Colset = Request.QueryString("co")
        Catalog = Request.QueryString("ct")
        if Request.QueryString("pg") <> "" then
            NextPageNumber = Request.QueryString("pg")
            NewQuery = FALSE
            UseSavedQuery = TRUE
            NewQuery = SearchString <> ""
        end if
    end if