>We are putting a Fox 6 front end on SQL 7.
>We would like to do incremental searches on wide tables. To do so we create a 2 field remote view from the table. Is there a way to do an optimized incremental search on the view?
>
>Obviously, in Fox, we index on a field and SEEK() on that field.
>Views are different, I assume? Any hints?
Not much different than using local tables.
You usually do something in a keypress or interactivechange event that does a Requery(). Do the same thing but use a parameterized remote view. Of course a properily indexed backend is much desired.
In SQL Passthrought
m.lnConnHandle = SQLCONNECT('dnsname')
ThisForm.cParam = 'S'
= SQLEXEC(m.lnConnHandle, 'SELECT name FROM customers WHERE customers.name like '+ALLTRIM(ThisForm.cParam)+'%', cursorname )
OR
lcParameter = 'S%'
= SQLEXEC(m.lnConnHandle, 'SELECT name FROM customers WHERE customers.name like '+lcParameter, cursorname )
Software engineers are trained to read and understand code; they are not trained in mind reading. Document the purpose not just the functionality.