Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem Implementing RI in a Transaction
Message
De
18/10/2001 15:15:27
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00570363
Message ID:
00570471
Vues:
22
>Hi, all!
>
>I implemented RI in my database and I am using the VMP4 default stored procedures.
>
>In my application I have some forms where I have to update several table files in one transaction. I am using an updateable view for one of my tables and only one form control is bound to it. Inside beforedefaultupdates() method I included a logic that writes information to the rest of this updateable view and also to several related tables. Some of the 'other' tables are related to each other: one is the child of another. My problem is a 'Restrict' insert does not allow me to add records to the children tables although the foreign key was inserted into the parent table in the previous lines of code. This is because the new record in the parent table has not been committed. Please remember that these are all happening in a single transaction.
>
>For now, I implemented an 'Ignore' insert but I should really enforce a 'Restrict' insert instead. Has anyone come across a situation like this? I appreciate any help.
>
>Evelyn

Evelyn,

Has tableupdate() been issued on the parent before you add the child records? It appears that it has not been...since you are in a function called beforedefaultupdates().
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform