Re: LOCATE vs. LOOKUP
- From: "Bill Todd" <no@xxxxxx>
- Date: 30 May 2005 11:26:03 -0700
I would not change the code. Locate changes the cursor postion. Lookup
does not. That is the only difference.
--
Bill Todd (TeamB)
Keith G Hicks wrote:
> I recently discovered that in several places in my current app I
> should probably be using "Lookup" rather than "Locate" on TDataSets.
> For example in areas where I have a data set in a data module and use
> it to lookup information sometimes. A dataset might have 4 columns
> and I need to find the value in column 3 based on the value in column
> 1 and then use the value somewhere in the program. I don't really
> need to be "on" the record located at this point as long as I'm able
> to get the value I want. I'm essentially using Locate to do the job
> that Lookup does. It works just fine as far as I can tell. I haven't
> encourntered any obvious problems with respect to this. But I was
> wondering what the experts have to say especially with respect to
> overhead. Just looking for opinions. Would rather not switch all
> these around if it's not necessary.
>
> Thanks,
>
> Keith
.
- Follow-Ups:
- Re: LOCATE vs. LOOKUP
- From: Keith G Hicks
- Re: LOCATE vs. LOOKUP
- References:
- LOCATE vs. LOOKUP
- From: Keith G Hicks
- LOCATE vs. LOOKUP
- Prev by Date: Re: How to use Seek method......
- Next by Date: Re: Error in post with ADOSQLServer
- Previous by thread: LOCATE vs. LOOKUP
- Next by thread: Re: LOCATE vs. LOOKUP
- Index(es):
Relevant Pages
|