As the article below notes, almost every application needs data searching. In Visual FoxPro, the first time out, many developers use a browse or a grid.
Or a user enters a value into a text box and the code behind it might look like:
IF SEEK(tcValue)
DO FORM details
ENDIF
But from Foxite and Jijo Pappachan, comes a very cool and easy to use Lookup class.
The class handles both SQL and VFP backends with ease, allowing for smart optimization.
Of course, if you're already using a framework, you may already have something like this - but this is something that should certainly be put into an updated FFC on VFPX. If you've ever used the existing FoxPro Foundation Classes search tool, it's pretty limited.
This one is definitely more in line with how applications are looking these days.
The sample pages don't work quite right and it needs a few tweaks to handle large field names but it can be easily called manually.
lo = NEWOBJECT("lookupdata","lookup")
USE Contacts
lo.SelectCmd="select fullname,ctitle,firstname from contacts"
lo.ShowLookup()
It attempts to put a tag name and since tag names have a limit to their field space, it may error out but otherwise it looks quite good.
Check it out below:
jijo pappachan : DataLookup - A framework class
Or a user enters a value into a text box and the code behind it might look like:
IF SEEK(tcValue)
DO FORM details
ENDIF
But from Foxite and Jijo Pappachan, comes a very cool and easy to use Lookup class.
The class handles both SQL and VFP backends with ease, allowing for smart optimization.
Of course, if you're already using a framework, you may already have something like this - but this is something that should certainly be put into an updated FFC on VFPX. If you've ever used the existing FoxPro Foundation Classes search tool, it's pretty limited.
This one is definitely more in line with how applications are looking these days.
The sample pages don't work quite right and it needs a few tweaks to handle large field names but it can be easily called manually.
lo = NEWOBJECT("lookupdata","lookup")
USE Contacts
lo.SelectCmd="select fullname,ctitle,firstname from contacts"
lo.ShowLookup()
It attempts to put a tag name and since tag names have a limit to their field space, it may error out but otherwise it looks quite good.
Check it out below:
jijo pappachan : DataLookup - A framework class
Comments
Thank you for your great interest on this class.
We have now resolved that long field indexing problem and some other bugs.
Please find the latest file here
http://www.foxite.com/uploads/5efbb0b4-d027-4a2e-8f3a-9582d48db142.rar