Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between Single user Grid and Multiuser grid
Message
From
31/01/2007 10:47:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
31/01/2007 09:56:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01190788
Message ID:
01190903
Views:
18
>>Edward: tell me method which have 100% agree with you.
>
>You use cursor as a grid.recordsource. This cursor will be filled 'on demand', i.e. when some variable (that you use for filtering now) changes you call Select ... Into cursor .... and refill the grid.

But not the same cursor, or the grid will rebuild. If a grid is fairly simple and field names are single words, it's OK, but if the grid has any code in its columns, I'd recommend what Marcia and Andy call "safe select":

One cursor is created for the grid, and it's readwrite. Whenever a new set of records is needed in this cursor, it is zapped (but not closed), and records are inserted into it. Now the way of insertion may vary - it can be SQL select into a temp cursor, then
Append from dbf("tempcursor")
or it may be direct
Insert into gridcursor select {field list} from ...
or even a loop that inserts records one at a time. And I agree - this is much faster than a view. View has to have a DBC open, and all the overhead that that brings. Plus the maintenance of such a DBC is pretty much the same amount of work as maintenance of individual select statements for grids, so the views only look simpler.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform