Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Takes too long to SEEK
Message
 
 
To
05/12/1997 16:26:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00064114
Message ID:
00064158
Views:
28
>>>I have a search form that uses the ingrid control in a grid to incrementally search members in out database. (125,000 records in the member table)
>>>The form works beautifully except for one thing: When the pointer is positioned on a record that begins with a letter somewhere in the middle of the list (Doesn't begin with 'A'), Searching for a name beginning with 'A' gives incorrect results:
>>>type: "ABART"
>>>positions the pointer on "BART"
>>>The reason this happens is that the control starts the search string over after a certain timeout value is elapsed, and searching on 'A' takes long enough for the search to time out and start the string over. I can adjust the timeout value (it is currently 1.5 seconds) to accomodate the problem, but that would defeat the purpose of the timeout.
>>>The strange thing is it only takes too long with the letter 'A', and no other letters.
>>>
>>>-OK I just did some testing. From the command window, 'A' takes just as long to search as the other letters. This leads me to believe that the delay is the grid repositioning itself.
>>>I have found a user workaround and that is to type 2 'A's when searching for a name that starts with 'A'. The first 'A' lets the search time-out and the second 'A' is searched succesfully.
>>>The delay seems to be only when the grid has to go to the very top, not any other position.
>>>This inconsistency is pretty odd.
>>>Does anybody know a way around it?
>>Hi,
>>Do you have an index tag on the field. With cSeekTag set to tagname, ingrid and grid refresh is instant no matter how many recs you have and what you search.
>>Cetin
>
>Cetin, if it s within your means, please try this situation and report your results. I use the Ingrid control on well over 20 forms, and the search result time is NOT the same depending on number of records. I am well aware that I need indexes on appropriate fields, your assumption that grid refresh rate doesn't change is simply wrong.

Erik:

I have had problems similar to yours with the InGrid incremental search. No matter what I did, my users hated the way it behaved. I finally abandoned that control in favor of an incremental search TextBox that I placed right above the grid and place a label next to it that says "Search". Once they hit the record they want, they can either hit the Enter key which takes them directly to the correct record in the grid below, or they can click off to where ever they want to go. They are much happier. I have this subclassed with 3 custom properties and all I have to do is drop it on a form.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform