General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
RI Code Differences between VFP6 and VFP9?
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???
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only