Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Yet another grid refresh question
Message
From
09/02/2006 12:44:49
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01094306
Message ID:
01095131
Views:
16
Terry --

1) Any reason I'm not using a database? Several --
First: Inertia, as I began working in Foxpro a few years ago, having not worked in it since the 1980's, I started with what I new best (if at all) -- freestanding tables.
Second: Besides this, however, (and ignoring the time/cost of conversion), my applications are not really run-of-the-mill. I have very little data-entry, as most of the data is updated/recreated by a background task hourly, and then is presented to the user in essentially read-only mode. From my quick reading about databases, there's a lot there about database integrity that I just don't care about.
Third: I have read some posts with warnings about databases that said essentially "if you need 'em, use 'em, but they can create problems."

2) As for relationships to other tables for grids -- I use them all the time, both to show fields from other tables and also to filter records when appropriate, without any problems.

Jim


>James
>
>I got the gist that your grid holds values from more than on table, e.g. group ID from one table and the Group name and details from the Group look-up table.
>
>A view is essentially the resultant cursor of an SQL statement, looking across tables, and thus can be treated as a flat table in its own right, and can be the source to a grid. So you could dispense with these relationships (I'm not sure that can work too well in a grid anyway, and I've certainly never had such a set-up in a grid)
>
>Setting up a view is quite simple and intuitive via the View Designer (similar to the QBE grid in Excel)
>
>You MAY have a "yankee screwdriver" in your hand but you don't want a sledge for panel pins, or tack hammer for floorboard brads.
>
>Now then, I see you've only free tables and, yes, views can only be built on database tables. Is there any reason why you're not using a database?
>
>Terry
>
>>
>>I don't know whether a view would be appopriate or not. I have no experience at all with views, nor knowledge of them. I don't know anything about why they would be better or worse than what I'm currently doing.
>>
>>This is only due to ignorance. I know how to use grids, and can do lots of things quite quickly with them. A friend of mine has an expression, "If you have a hammer in hand, everything looks like a nail." So, I know how to use grids, and I use them a lot.
>>
>>I haven't used views, but I have a foggy recollection of dismissing them outright when investigating them a long time ago. Do they have to do with databases or something? All of my tables are free-standing tables.
>>
>>
>>
>>>James
>>>
>>>Would a view not be appropriate as the source for the grid?
>>>
>>>Terry
>>>
>>>>I have a grid with a few columns where I'm having a problem with the (desired) refresh of two of the columns.
>>>>
>>>>The column has a group-ID in it, and the user can change it (as a combobox, but I use sparse=.T. so that the drop-down arrow only appears when the cell has focus).
>>>>
>>>>The grid's cursor has a relation set to another table, where there are other fields from the group-ID. Two of these fields (name and phone) appear as adjacent columns in the grid. When the user changes the group-ID, I'd like columns with the group-name and group-phone to change as well. However, this doesn't happen (unless I move the record off the screen and then return to it).
>>>>
>>>>What am I missing?
>>>>
>>>>Thanks
Jim Nelson
Newbury Park, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform