Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Problem Implementing RI in a Transaction
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement