Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To View Or Not To View
Message
De
01/07/1998 15:05:46
 
 
À
01/07/1998 15:01:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00113500
Message ID:
00113515
Vues:
33
>>>Okay, I've finally had almost marginal success with creating a useful view. I've even figured out that I needed a paramatized view and succeeded in having view appear as a grid on a page in my form. It even moves to the correct record when I click my next button which is tied to my parent table. Sounds good so far. My keypress method (down arrow)is supposed to add a new record to the table the view is based on, and it does. HOWEVER, I can't get the grid to refresh (yes, I've tried requery)unless I move to a new record and then back, in which case I can see the new entry. Any suggestions? TIA --lincoln
>>
>>If you add record to table, then you should =Requery("view") and then Grid.refresh to get new record in grid. However, normal interface usually works in opposite way: adds record to view, and only after this sends new record to table using Tableupdate(...,'view')
>
>I'm a reluctant convert to views. They scare me. But let me see if I understand your suggestion.
>
>My current insert command is as follows(sort of):
>
>Insert Into Table1(parent_id,other_id) Values (Parent.parent_id,Other.other_id)
>
>If I understand you correctly I should be doing something like:
>
>Insert Into ViewTable1(parent_id,other_id) Values (Parent.parent_id,Other.other_id)
>
>Am I getting warm?

Yes, and it's not my suggestion :), it's normal VFP way. The idea is that when you add record to a view, it's not in table yet, i.e. your interface can have Cancel functionality before you will issue Tableupdate() to send data changes from view to table.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform