Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching Module
Message
 
 
To
20/07/2001 03:41:49
Javed Yusuf
Analytic Systems
Lahore, Pakistan
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00533014
Message ID:
00533549
Views:
11
>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--
Previous
Reply
Map
View

Click here to load this message in the networking platform