Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ideas for passing records back to calling form
Message
From
23/09/2015 16:47:23
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
23/09/2015 12:58:47
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01624724
Message ID:
01625006
Views:
89
>>I would never use SEEK() in a VFP, SQL SELECT to lookup a value in another table, unless there is A VERY GOOD reason to do so. Just an extra join would do the trick just fine, even if it ends up a few ms slower.

I use SEEK against huge lookup tables if I cannot be sure that the execution plan for theoretically elegant SQL won't involve intermediate resultsets >2gb that crash the system. As you note, sometimes there's a good reason- and static lookup tables is one of those. SET RELATION can be even better, but lets not go there. ;-)

As for a production system using SEEK against live tables: probably the most efficient rewrite would involve Database Views filtered on each of the indexes used in seek, and then try to automate the conversion. Tricky effort unless the code uses SEEK() with named indices...

Re Datasessions: we've done it both ways. Apps written in the VFP3 days allowed multiple forms having their own datasessions to avoid screwing up activity in other forms, especially if adding a record. More recent work uses datasessions for privacy- iow switches to an empty datasession when interfacing to other systems. Most of the AI stuff I do predates datasessions and wouldn't benefit from them. I don't think there's any one answer.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform