Print Page | Close Window

Never turn on the 'Constraints Enforced' flag for a relation.

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=193
Printed Date: 13-Mar-2025 at 3:54am


Topic: Never turn on the 'Constraints Enforced' flag for a relation.
Posted By: Customer
Subject: Never turn on the 'Constraints Enforced' flag for a relation.
Date Posted: 12-Jul-2007 at 3:11pm
I am getting an error ""Unable to create DataRelation 'syndicate_data_stock'". It only occurs when I run certain programs in a certain sequence and I'm having trouble working out how to debug it.
Obviously the relation exists because in most cases, the code doesn't have any trouble with it. It seems to be happening in Indications..ctor, but it's hard to isolate it any further than that. The relation "indication.stock.syndicate_data" seems to be the one causing trouble, but it is used successfully elsewhere. Any idea how I would trace this down?



Replies:
Posted By: IdeaBlade
Date Posted: 12-Jul-2007 at 3:13pm
Research found that our support of foreign keys is broken and will be removed.  Solution for now is to never turn on the 'Constraints Enforced' flag for a relation


Posted By: Customer
Date Posted: 12-Jul-2007 at 3:14pm
I am now getting a different error on one of the tables in the relation.


Posted By: IdeaBlade
Date Posted: 12-Jul-2007 at 3:15pm
Setting "enforce constraints" would cause this problem.


Posted By: Customer
Date Posted: 12-Jul-2007 at 3:16pm
I have found one relation that did in fact have "Enforce constraints" checked (inadvertantly).  When I unchecked it the problem went away.



Print Page | Close Window