Files
harbour-core/tests/hsx.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

47 lines
1.0 KiB
Plaintext

/*
* Harbour Project source code:
* HiPer-SEEK indexing/search test
*
* Copyright 2008 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://harbour-project.org
*
*/
#include "dbinfo.ch"
// REQUEST RMDBFCDX
PROCEDURE Main()
FIELD FIRST, LAST, STREET, CITY
LOCAL n, hs
IF AScan( rddList( 1 ), "RMDBFCDX" ) != 0
rddSetDefault( "RMDBFCDX" )
ENDIF
USE test shared
hs := hs_Index( "test", "FIRST+LAST+STREET+CITY", 2, 0, , .T., 3 )
/* Look for all records which have 'SHERMAN' string inside */
hs_Set( hs, "SHERMAN" )
WHILE ( n := hs_Next( hs ) ) > 0
dbGoto( n )
IF hs_Verify( hs ) > 0
? RTrim( FIRST + LAST + STREET + CITY )
ENDIF
ENDDO
WAIT
/* Does RDD support Record Map Filters? */
IF dbInfo( DBI_RM_SUPPORTED )
/* if yest then let set filter for all records with 'SHERMAN'
word and look at them in browser */
hs_Filter( hs, "SHERMAN" )
dbGoTop()
Browse()
ENDIF
hs_Close( hs )
RETURN