Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function to return what VFP will do to my code?
Message
From
14/01/2019 06:47:12
 
 
To
14/01/2019 05:35:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
CodeMine
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01664494
Message ID:
01665370
Views:
59
>>Either use the SAFE SELECT technique,
>>query to a second cursor
>>then zap your grid's cursor
>>append into the grid's cursor from the second cursor
>>
>
>"SAFE SELECT" - a phrase that makes me smile whenever I see it :) Since there is a "SAFE" select, there should be the "UNSAFE" version of it? If so, what is that? I always thought selecting was safe.
>
>The process you describe for "SAFE" in the above is actually done simpler and I never thought to call it "SAFE":
>
>-(Save grid recordsource) and set it no null or empty string
>-Query into that recordsource cursor or any other cursor you like
>-Restore the recordsource

This does not work if you have some other objects added in the grid, like checkboxes etc. The grid gets completely messed up after re-setting the recordsource.

My experience is to create a grid class with all relevant settings and instantiate them on the fly.

1. Destroy grid (REMOVEOBJECT)
2. Select into cursor
3. Create gridobject (NEWOBJECT)
4. Set recordsource

Nice thing, if you have similar or same grids on different forms, you don't need to duplicate code, but instead instantiate them on the fly from the same class or subclass.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform