StacyStacy
Programmer
Can someone help me with the SET NEAR ON command. The following code works, but it will not return a record that has "Fred Flinstone" in the field, "task". The end result tells me that there are no records found.
Here's the code for the Find button:
SET NEAR ON
IF m.find = 1 AND NOT EMPTY(m.findthis)
SELECT * ;
FROM bashproc ;
WHERE bashproc.task = ALLTRIM(m.findthis) ;
INTO CURSOR pickone
IF _tally > 0 && I found at least one record that matched......
SELECT pickone
BROWSE
m.f1=pickone.task
m.f2=pickone.compdate
SELECT bashproc
SET ORDER TO TAG newkey
IF SEEK(ALLTRIM(pickone.task)+DTOC(pickone.compdate),"bashproc")
SELECT bashproc
SCATTER MEMVAR MEMO
SET ORDER TO
CLEAR READ
RETURN
ELSE
WAIT WINDOW "Seek Into BASHProc Failed"
ENDIF
ELSE
WAIT WINDOW "No Matching Record(s) found"
ENDIF
* SET NEAR ON
* INDEX ON task TAG Task ADDITIVE
* SEEK ALLTRIM(m.task)
* SET NEAR OFF
* IF NOT FOUND()
* GO BOTTOM
* WAIT WINDOW "The Query You Entered Was Not Found!" NOWAIT
* ENDIF
ELSE
WAIT WINDOW "Search Canceled!" NOWAIT
ENDIF
CLEAR READ
Here's the code for the Find button:
SET NEAR ON
IF m.find = 1 AND NOT EMPTY(m.findthis)
SELECT * ;
FROM bashproc ;
WHERE bashproc.task = ALLTRIM(m.findthis) ;
INTO CURSOR pickone
IF _tally > 0 && I found at least one record that matched......
SELECT pickone
BROWSE
m.f1=pickone.task
m.f2=pickone.compdate
SELECT bashproc
SET ORDER TO TAG newkey
IF SEEK(ALLTRIM(pickone.task)+DTOC(pickone.compdate),"bashproc")
SELECT bashproc
SCATTER MEMVAR MEMO
SET ORDER TO
CLEAR READ
RETURN
ELSE
WAIT WINDOW "Seek Into BASHProc Failed"
ENDIF
ELSE
WAIT WINDOW "No Matching Record(s) found"
ENDIF
* SET NEAR ON
* INDEX ON task TAG Task ADDITIVE
* SEEK ALLTRIM(m.task)
* SET NEAR OFF
* IF NOT FOUND()
* GO BOTTOM
* WAIT WINDOW "The Query You Entered Was Not Found!" NOWAIT
* ENDIF
ELSE
WAIT WINDOW "Search Canceled!" NOWAIT
ENDIF
CLEAR READ