Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple table update view insert
Message
 
À
05/09/2001 16:50:36
Gil Munk
The Scarborough Group, Inc.
Baltimore, Maryland, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00551919
Message ID:
00552948
Vues:
17
Gil,

Thanks for your responses.

Unfortunately I must update the secondary table so marking its fields as not updatable won't get the job done.

Therefore, I will be breaking my view up into 2 separate views.

In my old approach I inserted a view record with the primary key of the secondary table set to an existing record from its base table. I was thinking/hoping that this action would defeat the inserting of a new record in the secondary table at tableupdate. However, if I set the secondary table's primary key to not updateable a new record is added (to the secondary table) with a newly generated primary key (ie not the one I set). If I mark the secondary primary key as updatable, I get an error when a record insert with an already used primary key is attempted.

You mentioned checking the referential integrity code. I didn't add any special ri code for this view to what already comes with the MM framework. I did take a look at the supplied code though. That's all I got for that effort was a bigger headache. I basically understand ri as it pertains to cascading deletes etc, but actually reading and understanding the supplied code w/o comments would be a major task for me.

Anyway, thanks again. I think I now have an approach that will work for me.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform