Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search question

Status
Not open for further replies.

MicInT

Programmer
Oct 11, 2000
2
HK
Dear All,

I am writing Java Program to send a string condition to foxpro to execute find using "locate for [condition]". As in my program, it support search for using * to replace the exact word, eg. Find "*abc" can have reult "dabc", "cabc" ... How foxpro can implement this?

I know that SQL can use "%abc", but i found that locate for cannot. If i type (locate for [field] = "%abc"), it cannot find th result. What can locate for's condition use?

Please help! Thank you very much!

MichInT [sig][/sig]
 
you might try...

LOCATE FOR AT(cSearchFor,cSearchIn) &&case sensative
or
LOCATE FOR AT(cSearchFor,cSearchIn) &&not case sensative

[sig]<p> Pete<br><a href=mailto:blindpete@mail.com>blindpete@mail.com</a><br><a href= > </a><br>What your mother told you is true! You will go blind! (from moonshine anyway)[/sig]
 
Err oops

that is ATC() for not case sensative [sig]<p> Pete<br><a href=mailto:blindpete@mail.com>blindpete@mail.com</a><br><a href= > </a><br>What your mother told you is true! You will go blind! (from moonshine anyway)[/sig]
 
Or you can use:
-----Locate [string]$[var]-------
example:
----locate for “Test” $ ”Test Function”-----
if could be lower or uppercase
use
----Locate for ”TEST” $ upper(“Test Function”)---
Or
-----Locate for ”test” $ lower(“Test Function”)------
after use
---CONT---
Until the cursor get the last record.
when use locate the cursor jump to the top of the table
and start the search.
[sig][/sig]
 
Pete, I think you pulled a Bradley. What you probably meant was:

LOCATE FOR AT(cSearchFor,cSearchIn) > 0
[sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Dooooh! As Homer Simpson would say.

You are correct. Need more coffee. Much more coffee. [sig]<p> Pete<br><a href=mailto:blindpete@mail.com>blindpete@mail.com</a><br><a href= > </a><br>What your mother told you is true! You will go blind! (from moonshine anyway)[/sig]
 
is that where the 'blind' comes from? :eek: [sig]<p>John Durbin<br><a href=mailto: john@johndurbin.com> john@johndurbin.com</a><br><a href= </a><br>MCP Visual FoxPro<br>
ICQ VFP ActiveList #73897253[/sig]
 
My name is Ben. :)

Sadly 'BlindPete' is in memory of my older brother Pete. The diabeties that ultimately ended his life also made him blind. It was his very affectionate nickname use by his little brother (me). He died a long time ago. I just use &quot;BlindPete&quot; to keep his memory fresh.

John, I should have included you in my list of all knowing VFP'rs you've answered lots of my questions too. Sorry about the oversite. BTW you wouldn't happen to know why MODIFY REPORT in a distrubeted EXE doesn't work?
[sig]<p> Pete<br><a href=mailto:blindpete@mail.com>blindpete@mail.com</a><br><a href= > </a><br>What your mother told you is true! You will go blind! (from moonshine anyway)[/sig]
 
Well that's a nice tribute by you. I don't have any brothers but I'd glady trade you up to 3 sisters for one. I didn't think users were allowed to modify reports? Have you ever been able to do that? Dude, there is soo much I don't know or have a clue on. Any language especially as rich as VFP has literally what? hundereds of thousands of things to know? It's unreal. Sometimes I feel so smart and sometimes I dun't. Good thing we have this forum and the web to look things up :) [sig]<p>John Durbin<br><a href=mailto: john@johndurbin.com> john@johndurbin.com</a><br><a href= </a><br>MCP Visual FoxPro<br>
ICQ VFP ActiveList #73897253[/sig]
 
John

I didn't think users were allowed to modify reports? Have you ever been able to do that?

There is a FAQ on this site regarding that question.

If you would like info on an updated version which allows a user to also delete report objects, e-mail me at support@lithoplas.com

Chris [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top