Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TTable.Locate and Locate Next???

1,468 views
Skip to first unread message

Deane Hafling

unread,
Jun 3, 1998, 3:00:00 AM6/3/98
to

I have found the ttable.locate function. What about a locate next? Or
how can I program a locate next funtionality. Or am I supposed to use
the ttable.findkey?


Deane

Richard A. Howard

unread,
Jun 3, 1998, 3:00:00 AM6/3/98
to

Deane Hafling wrote in message <35756D...@JUNO.COM>...

It sounds like FindKey may be better for you. I use TTable.Locate only when
I am looking for a specific, single record. Others may use it differently.
Or, you could filter the dataset and use FindFirst and FindNext to solve
this problem. This might be the easiest solution.

Richard

Ivan Detkov

unread,
Jun 3, 1998, 3:00:00 AM6/3/98
to

You are right, Richard but my experience say that filtering is slow with
desktop databases and I can recommend to use it only with SQL servers for
simple cases and small tables.

Ivan Detkov
Zedak Corp.

Richard A. Howard wrote in message <6l46bc$ot...@forums.borland.com>...

mario paradis

unread,
Jun 3, 1998, 3:00:00 AM6/3/98
to

You could use ttable.findNeareast([value]) on an index.

I also have a question about findNearest , is it possible that it's not
compatible with Interbase table, with my paradox table, it's working great
but with my interbase table, it gives me an 'Field index out of range' error
at run time. Any solutions?

Mario Paradis
CIM Inc.


Deane Hafling a écrit dans le message <35756D...@JUNO.COM>...

Deane Hafling

unread,
Jun 5, 1998, 3:00:00 AM6/5/98
to

Richard A. Howard wrote:
>
> It sounds like FindKey may be better for you. I use TTable.Locate >
> Richard

Will this work if it is not a key field though?

Deane

Deane Hafling

unread,
Jun 5, 1998, 3:00:00 AM6/5/98
to

mario paradis wrote:
>
> You could use ttable.findNeareast([value]) on an index.
>
>
> Mario Paradis
> CIM Inc.

Ivan Detkov

unread,
Jun 5, 1998, 3:00:00 AM6/5/98
to

You should have the field indexed.

Ivan Detkov
Zedak Corp.

Deane Hafling wrote in message <3577F2...@JUNO.COM>...

David Ullrich

unread,
Jun 5, 1998, 3:00:00 AM6/5/98
to

Ivan Detkov wrote:
>
> You are right, Richard but my experience say that filtering is slow with
> desktop databases and I can recommend to use it only with SQL servers for
> simple cases and small tables.

Then how _do_ you do a "FindNext"???

--
David Ullrich

sig.txt not found

Ivan Detkov

unread,
Jun 8, 1998, 3:00:00 AM6/8/98
to

David,

To move to the next record I am using

1. Locate --> No way; IMHO it is generally not good idea to use this method.
2. Filtering --> Next; It is all right for SQL Servers in simple cases.
3. FindFirst --> FindNext. It is all right for desktop databases.

With SQL Servers and big tables or complex search criteria I can recommend
only TQuery. You are going to query server every time you need filter
records. It is the only reasonable strategy in client/server architecture.

Ivan Detkov
Zedak Corp.

0 new messages