LOCATE vs. LOOKUP



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


.



Relevant Pages

  • Re: LOCATE vs. LOOKUP
    ... Keith G Hicks wrote: ... > For example in areas where I have a data set in a data module and use ... > it to lookup information sometimes. ...
    (borland.public.delphi.database.ado)
  • Re: Linear interpolation between two points found using a lookup funct
    ... I need to find x0 and x1 from a column using a lookup ... >For example given a data set: ... Errors will be output if NewX is outside of the range of x_s. ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Lookup to return multiple results in one cell
    ... Above is my example data set. ... results on one line based off a lookup. ... I look for Jack and the formula returns: "X123, X224" in one cell. ...
    (microsoft.public.excel.programming)
  • Re: unspecified error - when trying to connect to ms access 2007
    ... I connect dbgrid via a data module using adoconnection string and ... My guess is you are running out of the IDE and you have a lookup field defined ... you have the debuger set to break on exceptions. ...
    (borland.public.delphi.database.ado)