Index Server

Index Server

Postby jfafive » Sun May 17, 2009 2:00 pm

Hola Amigos,

Quisiera si alguien sabe si se puede usar el Index Server que trae windows.
Sería estupendo poder utilizalo ya que el se podrían realizar búsquedas en nuestro disco duro
de una forma rápida y potente.

Yo he estado investigando por la web pero solo he podido encontrar un hilo que apunta a http://www.codeproject.com/KB/asp/indexserver.aspx

He intentado adaptar lo que muestra este hilo a FWH de la siguiente forma:
Code: Select all  Expand view
#include "FiveWin.ch"

function main()

   local idxSvr, idxRS
   local cVar := ""

   idxSvr := TOleAuto():New( "ixsso.Query" ) // Creamos el objeto Index Server

   idxSvr:Columns := "DocTitle, Path, Size, Characterizacton" // indicamos las columnas que va a mostrar

   idxSvr:SortBy := "DocTitle" // Que lo ordene por esta columna

   idxSvr:MaxRecords := 300

   idxSvr:Catalog := "prueba" // nombre de catalogo que he creado

   idxSvr:Query := "juan" // valor de búsqueda

   idxRS := idxSvr:CreateRecordSet("nonsequential") // En esta linea falla
 
    while !idxRS:EoF

      cVar += idxRS( "DocTitle" ) + CRLF

      idxRS:MoveNext()

   end

   MsgInfo( cVar )


return nil


Para hacer este código, me he guiado por el ejemplo que muestra en ASP y por mi intuición.
Pero da error al intentar crear el recordset.

El error generado es este:
Code: Select all  Expand view
Application
===========
   Path and name: C:\FWH\SAMPLES\PRUEBA.EXE (32 bits)
   Size: 1,464,832 bytes
   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 05/17/09, 15:58:16
   Error description: Error ixsso.Query/3  DISP_E_MEMBERNOTFOUND: CREATERECORDSET
   Args:
     [   1] = C   nonsequential

Stack Calls
===========
   Called from:  => TOLEAUTO:CREATERECORDSET(0)
   Called from: prueba.prg => MAIN(20)

System
======
   CPU type:         Intel(R) Pentium(R) M processor 1500MHz 1500 Mhz
   Hardware memory: 511 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Compiler version: Harbour devel build 1.1-1 Intl.
   Windows version: 5.1, Build 2600 Service Pack 3

   Windows total applications running: 0

Variables in use
================
   Procedure     Type   Value
   ==========================
   TOLEAUTO:CREATERECORDSET
     Param   1:    C    "nonsequential"
     Local   1:    C    "ixsso.Query"
     Local   2:    N    0
   MAIN
     Local   1:    O    Class: TOLEAUTO
     Local   2:    U    
     Local   3:    C    ""

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFCDX
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 HBDEBUGGER
     5 HBDBMENU
     6 HBDBMENUITEM
     7 HBDBWINDOW
     8 GET
     9 HBGETLIST
    10 TBROWSE
    11 TBCOLUMN
    12 TOLEAUTO
    13 TREG32

Memory Analysis
===============
      119 Static variables

   Dynamic memory consume:
      Actual  Value:          0 bytes
      Highest Value:          0 bytes


En fin, creo que sería interesante para todos poder tener acceso a este objeto del sistema.
Y poder explotar su potencia de búsqueda.

Si alguien ha intentado o domina el index server, agradecería cualquier ayuda.
Gracias.
:roll:
Javier,
FWH 8.04 2008
jfafive
 
Posts: 396
Joined: Tue Mar 18, 2008 9:41 pm
Location: Marbella

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests