Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do not understand view behavior
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00753207
Message ID:
00754049
Vues:
24
Yuri
Thanks for the response. I do want to update both tables but only if the contact does not exist in pocontact. I really must be missing something. I thought I could get the next id, which determines a groupid (2 letters plus the nextid value), let the user enter the rest of the data then do a table update. This is where the "uniqueness of primary key violated" happens. I look in the primary table and it has not been updated at all and of course I can't look at the updatedable cursor unless I do a table revert. I am still confused. I think the primary table is trying to update itself again because of the stored proc in the primary key field default value.

>The problem here is that your view is based on two tables, but you want to add a record to only one of them. So VFP remains uncertain what to do. It is a common problem for views based on more than one table.
>
>What table do you actually want to update? Maybe it would be OK to have a view like this?
>
>
>SELECT *;
>   FROM  property!propnum ;
>   WHERE SUBSTRC(groupid,1,2) = "CF" and;
>   contactid in (select memoid from property!pocontact)
>
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform