Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending to views
Message
De
15/07/1998 16:27:55
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00116402
Message ID:
00117825
Vues:
23
>>Nope. You SELECT_SQL into cursor. The same select-sql as for view.
>
>***
>Oh, that way. But if you're going to do a select, why not do a view? With cursors, AFAIK, you can't nest them and you can't save them. Our reports usually aren't very simple, and being able to nest the views would help a lot. Plus, if I use a view, I can run the report straight from VFP. If I have to make a cursor first before running the report, I have to have a .prg file for every report. Maybe I'm missing something, but views sound better than cursors to me.

Views is just overhead vs cursors for reporting purposes. Surely, I mean real application (not VFP itself) where you will inflate dbc file with view definitions. The difference between view and cursor is that view is buffered and inherently send data back to table(s), but you don't need in this features doing reporting. I don't know what do you mean as 'nesting', but don't worry: cursors can do all the same as views when you make reports.

>>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.
>
>***
>If I get rid of the joins, then I only have one table. Why make a cursor/view for one table?

It's because you don't need to bring all available trips into grid. You just want to show trips records pertained to particualr client, right? So, you need in subset of data, i.e. view or cursor.

>>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.
>
>***
>I think I like the second option better. Then I don't have to have extra code to handle putting the values into the table.
>***

'Extra code' is part of programmer's life :)

>>Yes, you have Column.ControlSource="thisform.getcolumnvalue(trips.back_off)" etc. It was posted.
>
>***
>I think it's time for me to go back and re-read all the posts. I've gotten everything muddled and am asking the same questions over again. That's a waste of your time when you've already answered. No more questions until I re-read and think things through. Well, no view questions, anyway. I'm sure I'll have other things to ask. :)
>***
>
>Thanks,
>
>-Michelle
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform