Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View Question
Message
De
23/09/2000 09:45:45
 
 
À
23/09/2000 00:17:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00420153
Message ID:
00420184
Vues:
23
My suggestion: there is a vfp program call gendbc.fxp (it comes with vfp) that generates a .prg to recreate all the tables or views contained in a database container. Run that program, it will ask you to a .dbc Give the name of a database that you have created and that have views and let it generate a .prg to you. Then, take a look at .prg generated and you will see how do you set a view programatically to send updates to original tables. Follow the code as a example and set these parameters of the view you created.
By do that this way, you can just update or insert a record on the view, this update or insert will be sent to base table automaticaly.




I use a parameterized view to generate a set data that the user are autorized to see. eg.

I use the following code to creat para view:

SET EXACT OFF
CREAT SQL VIEW vpohead AS;
SELE po,date,amt,perinch,cusid,issue;
FROM po ;
po.perInCh = ?mPer ;
ORDER BY 1

Then I link source table with this view. So if user move the record in view, the source table will also move to same record.

My problem is if the user add/edit a record, which way is better to handle the situation,

1)insert/update the record to both view and table or
2)insert/update the record to source table and requery the view.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform