Instead of all the OR's, why don't you ask first if the user is searching on
one of your parameters, then you can shorten your where clause.
And if your search is on a control# which is unique, then make it a primary
key.
Bernie Lis
----- Original Message -----
From: Jim Belisle
To: RBASE-L Mailing List
Sent: Monday, January 11, 2010 1:01 PM
Subject: [RBASE-L] - Re: ON KEY PRESS
Jan,
How would the code go for that? THIS IS THE CODE NOW.
ENDIF
-- Pre-define variables
SET VAR vQuotes = (CVAL('QUOTES'))
SET VAR vMany = (CVAL('MANY'))
SET VAR vSearchString TEXT = NULL
SET VAR vWhereClause TEXT = NULL
SET VAR vSearchString = (.vQuotes+.vKeyword+.vMany+.vQuotes)
-- Define Where Clause
SET VAR vWhereClause = +
('Control# LIKE'&.vSearchString&'OR ' + +
'DistName LIKE'&.vSearchString&'OR ' + +
'ShipState LIKE'&.vSearchString)
PROPERTY LV_Quotes REFRESHLIST 'TRUE'
LABEL Done
Jim
------------------------------------------------------------------------------
From: [email protected] [mailto:[email protected]] On Behalf Of jan johansen
Sent: Monday, January 11, 2010 11:56 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: ON KEY PRESS
Jim,
I use the on-key press across a network to search customer names (about 3000).
One thing I did was to "shorten" my search. The search does not lookup up
until
the 3rd key-press. That way it reduces the number of records returned.
Jan
-----Original Message-----
From: "Jim Belisle" <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Mon, 11 Jan 2010 11:42:17 -0600
Subject: [RBASE-L] - Re: ON KEY PRESS
Jan & Larry,
I do not have indexing on any of the fields. Being a novice at programming,
I watch the list when questions come through on indexing and am confused as to
when to use them. It seems in some instances the list says not to use them and
in other use them. I will have to try that.
Jim
----------------------------------------------------------------------------
From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence
Lustig
Sent: Monday, January 11, 2010 11:38 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: ON KEY PRESS
<<
I am using the On key press feature to edit orders. The orders table has
20,000 plus rows and it is taking ten seconds or more for each keystroke to
search the records.
What can I do to make the process faster? I just updated to the latest 7.6.
>>
What is the search you are executing in the ON KEYPRESS event? If it's
non-indexed, expect it to take a few seconds.
--
Larry