Hi Paul,
I don’t know the Studiotips solution to type-ahead, so can’t comment on that. However, if you are looking to perform type-ahead searching against a SQL database, then I imagine a SQL Worker object could be used.
You would instantiate and initialise the worker object and $start it with the first character(s) in the query. Have $keyevents turned on for your entry field and upon a key event, immediately $cancel the worker task and $start with the new entry string.
This is just an idea and not something I’ve personally used yet. How the performance pans out would depend on the amount of data in the table your users are querying, whether the query uses an index on the queried column, and how many lines (i.e. how much data) are returned from a typical type-ahead query.
It could potentially lead to a fairly slow user experience where they see nothing returned until they stop typing for long enough to allow the worker object to complete and return some results. Therefore, it might be an idea to have two worker objects, allowing one to continue running while you start the other? You might also want to limit the number of rows returned by this background process (select top 10….from <tablename>…) and only return a larger dataset if this completes and no further key events have been detected.
As I say, this is thinking out loud. Hope it gives you some ideas.
Rgds,
Gav