Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using cursoradapter
Message
From
06/08/2018 01:58:21
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01661443
Message ID:
01661448
Views:
84
>Is there the possibility to change at runtime the selectcmd property? To reduce the number of fields I need every time to change my select command. Alternatively I have to set every time a select * command that is not the best solution... Someone can give me a suggest.?


I think it is doable, but as a number of lists have to be set depending on the fields inside the cursor for updates to work, the dynamic tweaking we do is in filtering a static field list through different where-components. Would have to look into code not here to see if any special tricks were needed or a static command is compared to properties filled dynamically.

If you really have a use case for dynamic field list through a single cursor adapter, my guess is to have a method build all relevant entries/lists from parameter or property. Another idea might be to precalculate all possible entries to a table or array and move entries into the cursor adapter properties from this pre-calculated store.

But perhaps assigning a different static cursor adapter to a variable/property/parameter is better strategy: I do have trouble imaging the need for totally different cursors into a single cursor (name)... Feels somewhere between weird and wrong without more info from your side/use case, like using a sledge hammer to drive wood screws into concrete.
Previous
Reply
Map
View

Click here to load this message in the networking platform