Subject Re: SEARCHING VERY LARGE FILE
From Agostinho <Agostinhoteixeira@yahoo.com > <Agostinho <Agostinhoteixeira@yahoo.com >>
Date Wed, 01 Sep 2021 15:57:03 -0400
Newsgroups dbase.getting-started

Thanks Akshat for the input, it looks interesting
I'll give a try.
Once again thank you very much.
Agostinho


Akshat Kapoor Wrote:

> Good Evening Agostinho,
>
> > This method works as a charm in medium/small files, it is very simple with only a few lines of programming, every ones knows  that the incremental search is the actual way to go, similar to google search.
> > Indexes works fine but it will reach only the information at the beginning of each records, this way of search is not efficient.
> > I'll keep  on researching until I get a perfect method to get a good incremental search for my large databases.
> > Once again thank you very much and have a wonderful day.
>
> Have you tried using a timer.
> I prefer waiting for 1 second before requery()
>
> The code that I use
>
> in Form_onOpen
>
>        _app.select2 = form
>        form.twait = false
>        form.timer = new timer()
>        form.timer.interval = 0.75
>        form.timer.ontimer = {;_app.select2.twait = false ;
> _app.select2.timer.enabled = false; _app.select2.searchcode_onkey2()}
> //Watch for word wrap in above line and the following lines also.
>        form.timer.enabled = false
>
>
>     function SEARCHCODE_onKey(nChar, nPosition,bShift,bControl)
>                 if form.twait
> //                        do nothing
> //                        We are waiting for additional key strokes
>                 else
>                         form.twait = true
>                         form.timer.enabled = true
>                 endif
>        return
>
>
>     function SEARCHCODE_onKey2(nChar, nPosition,bShift,bControl)
>         if form.sc <> alltrim(upper(form.searchcode.value))
>            form.sc = alltrim(upper(form.searchcode.value))
>             form.invedatamodule1.inve.params["SC"].value = "%"+form.sc+"%"
>             form.invedatamodule1.inve.requery()
>            form.rowset.first()
>         endif
>        return
>
>
> I have stripped the code of lots of lines that were customised for my
> special usage.
>
> But hopefully I have been able to pass on the concept.
>
> Regards
> Akshat