Board index » delphi » IBX 5.04 and locate

IBX 5.04 and locate


2004-04-21 03:57:38 PM
delphi211
Hi
Can I do a LocateNearest or something like that ?
I have an appl. made in D5 using IBX against IB.
I use MyQuery.locate...... to locate a specific value.
But sometimes my customers types in more, so that even if I use
Locate('MyField',MyValue,[loPartialKey]) the rutines does find anything.
Exampel.
I have 2 records with values like 1000 and 2000.
My customer then type 1300, and would like to find the nearest one matching.
I keep telling them, just to write 1 and the try to locate, but they keep
complaining about it.
Regards
Michael
 
 

Re:IBX 5.04 and locate

Redefine the SelectSQL and rexecute the sql. Use the server to do the work
for you.
For example:
User Input:>1000 -->add some where clause like: col1>1000
User Input: a% --->Add some where clause like col2 like 'a%' or (but
the not any use with indexes = full table scan = lareg table = slow,
upper(col2) like upper('a%')
"Michael Vilhelmsen" <XXXX@XXXXX.COM>schreef in
bericht news:40862970$XXXX@XXXXX.COM...
Quote
Hi

Can I do a LocateNearest or something like that ?

I have an appl. made in D5 using IBX against IB.

I use MyQuery.locate...... to locate a specific value.

But sometimes my customers types in more, so that even if I use
Locate('MyField',MyValue,[loPartialKey]) the rutines does find anything.

Exampel.

I have 2 records with values like 1000 and 2000.
My customer then type 1300, and would like to find the nearest one
matching.

I keep telling them, just to write 1 and the try to locate, but they keep
complaining about it.


Regards
Michael