>Hi,
>
>I am creating a procedure in the VFP 9 application that will Cascade update of all FK values in child tables when user changes the value of unique field in the parent table. What I do is set "transactions" to 2 (via SQLSETPROP) and then update Parent table and then Child Tables. But I get error that the update conflicts with the Foreign Key constraint set in the SQL Server on a Child table. I thought that the "transaction" will take care of it. So is there a way to get around this? Is there a way to make SQL Server ignore the constraints until the Transaction is finished? Any other suggestions? TIA.
I suggest to use SQL Server transactions, e.g.
BEGIN TRANSACTION
UPDATE Parent
UPDATE Child
COMMIT TRANSACTION
If it's not broken, fix it until it is.
My Blog