Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching Module
Message
 
 
À
20/07/2001 03:41:49
Javed Yusuf
Analytic Systems
Lahore, Pakistan
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00533014
Message ID:
00533549
Vues:
10
>Any body know about searching module which has ability to search my keyword in whole table and give my detail which record and which field have this keyword

You can write your own. Here's a sample code
LPARAMETERS tcAlias, tcSearchString

CREATE CURSOR SearchResult ( ;
		RecordNumber N(10), ;
		FieldNumber  N(3), ;
		FiledName    C(128) )

SELECT (tcAlias)
LOCAL lnI, lnFound
lnFound = 0
SCAN 
    FOR lnI=1 TO FCOUNT()
	IF TYPE( FIELD(lnI)) = "C"
 	    IF tcSearchString $ EVAL(FIELD(lnI))
		INSERT INTO SearchResult VALUES (RECNO(), lnI, FIELD(lnI, tcAlias))
		lnFound = lnFound + 1
	    ENDIF
	NDIF
   ENDFOR
ENDSCAN
 
RETURN lnFound
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform