Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RI Code Differences between VFP6 and VFP9?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
RI Code Differences between VFP6 and VFP9?
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01002341
Message ID:
01002341
Views:
72
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
Map
View

Click here to load this message in the networking platform