Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updatable Views - URGENT!
Message
 
À
24/11/1998 11:36:19
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00160967
Message ID:
00161014
Vues:
37
>I just can't seem to get this to work. I have a view defined in code as:
>
>CREATE VIEW MyView AS ;
>SELECT MyTable.*, MyCodeTable.CodeDesc, MyCodeTable.Code ;
>FROM MyTable ;
>LEFT OUTER JOIN MyCodeTable ;
>ON MyTable.CodeValue=MyCodeTable.Code ;
>WHERE MyTable.ID=?AnotherTable.ID
>
>I set all of the fields as Updatable EXCEPT the KeyField in MyTable and the fields in MyCodeTable. I set SendUpdates to true. I played around with the "Tables" property. By default it lists both tables. If I change it to specify only MyTable, when I make changes to the view it doesn't update MyTable. If the Tables property lists both tables and I delete a record in MyView, it deletes the corresponding records in BOTH tables. All I want is to be able to update MyTable. It shouldn't change anything in MyCodeTable.
>
>What am I missing?

I'm not sure, it's kind of tricky :) But my procedure for this is to use the Designer for a simplified version, but selecting/setting all the fields as desired. Then get the code for the view (I suggest Erik Moore's Genview from the Files section). Then compare (and perhaps copy) all the view properties/settings you need into your own view generation code...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform