Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
RI Code Differences between VFP6 and VFP9?
Versions des environnements
I have a database that was created with VFP6 and I am now using VFP9. Several of my tables are now giving a "Trigger failed" error when inserting records. There are 22 RI_INSERT procedures in my database. I have compared the RI_INSERT code from the VFP6 database to the VFP9 database and found the following code as been added for each table:
if llRetVal and not (isrlocked(pnParentRec, lcParentWkArea) or ;
isflocked(lcParentWkArea))
if rlock(lcParentWkArea)
unlock record pnParentRec in lcParentWkArea
else
=rireuse("tparen",lcParentWkArea)
pnError = rierror(-1,"Insert restrict rule violated.","","")
IF _triggerlevel=1
DO riend WITH llRetVal
ENDIF at the end of the highest trigger level
SELECT (lcStartArea)
RETURN llRetVal
endif
endif
If I comment the above code in the RI_INSERT procedure, the "Trigger failed" error goes away. I should mention that I only get the "Trigger failed" error on about half of my tables.
Any suggestions???
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