Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending to views
Message
From
15/07/1998 16:00:51
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00116402
Message ID:
00117808
Views:
24
>>Did your instructor tell you what is cursor? It has nothing common with scanning through a table, searching another, adding this and that...
>
>
>As far as I know, a cursor is like a temporary table. That's how we do the reports in this version: create a cursor, scan through the tables, to whatever data manipulation we need to do, insert into cursor.

Nope. You SELECT_SQL into cursor. The same select-sql as for view.
>
>
>>That's Ok, and I remember that I answered how to make this grid.
>
>Yeah, I didn't mean for you to re-tell me. I just put that in there so I could show the whole problem.
>
>>No problems again. You can even include this button into grid row. If grid is read-only then you can even replace view with cursor.
>
>But if I use a view or a cursor for the grid, how do I know what record from the trips table it corresponds to so I can put up the second form? But if I remember right, the way you told me to do the grid wasn't with a view or cursor...

You misunderstood me. I actually said that view/cursor behind the grid might be simplified to remove extra joins, by customizing controlsources for location columns.
If you use view as grid.recordsource then the only thing to do is TABLEUPDATE(). If you use cursor (which is essentially the same with the only difference that cursor doesn't have inherent tableupdate command), then you add records simultaneously to this cursor and table :
INSERT INTO Trips ...
INSERT INTO curTrips ...
Surely, your cursor (the same as view) should carry primary keys from trips table.

>>Very good. You just have some method which will populate these textboxes.value properties in a case of unbound controls. If you want to use bound controls here, then you probably will need in two 'location' aliases.
>
>What do you mean by "unbound controls"? No control sources? How do I get the info into the tables if that's it?

Yes, unbound interface is controls without controlsource. To get them populated with data, you just reset their value properties. Note, that I don't urge you to use unbound interface, it's not common way, I just told you what is my preference. You can still use bound interface here with 2 location aliases.

>>It can be done both ways, and there are many more ones. You just should stick to one particular way which is convenient for you. My approach would be to use Client table on the first form with grid populated by cursor from trips table. Also, location columns of this gris will have customized controlsources looking for location records. The second form would have unbound textboxes populated by searching location table twice (for pick-up and drop-off).
>
>Customized controlsources... I think _that's_ what you said for the grid earlier, isn't it? I'll have to go back and look at that post. I have no idea how to make a customized control source, and if you explained it already I don't want to ask again.
>
Yes, you have Column.ControlSource="thisform.getcolumnvalue(trips.back_off)" etc. It was posted.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform