PC Review


Reply
Thread Tools Rate Thread

Does enforceconstraints mean errors or relations??

 
 
bjako
Guest
Posts: n/a
 
      2nd Mar 2005
Does the EnforceConstraints option on a dataset just basically turn on
and off errors?

I read the doco thinking it meant I could temporarily turn off the
relations that were added to the dataset but it would appear it has no
affect on enforcing the relations?

The doco states "Gets or sets a value indicating whether constraint
rules are followed when attempting any update operation."

But if I delete a parent record it automatically deletes the children.
Sounds like constraints are being enforced or should I not think of a
relation as a constraint?

Any clarification or pointers to good articles would be much
appreciated to clear this one up.

Thanks,Ben
 
Reply With Quote
 
 
 
 
William Ryan eMVP
Guest
Posts: n/a
 
      3rd Mar 2005
A constraint isn't violated if you delete a parent record and it deletes the
child. There are many constraints available that aren't relations, like
PrimaryKey, AllowNull etc. Turning off constraints disables them but if you
violate one of the rules, you may not be able to reset the constraint again
when you try to enable it unless your data conform.s

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"bjako" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Does the EnforceConstraints option on a dataset just basically turn on
> and off errors?
>
> I read the doco thinking it meant I could temporarily turn off the
> relations that were added to the dataset but it would appear it has no
> affect on enforcing the relations?
>
> The doco states "Gets or sets a value indicating whether constraint
> rules are followed when attempting any update operation."
>
> But if I delete a parent record it automatically deletes the children.
> Sounds like constraints are being enforced or should I not think of a
> relation as a constraint?
>
> Any clarification or pointers to good articles would be much
> appreciated to clear this one up.
>
> Thanks,Ben



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling EnforceConstraints John Microsoft ADO .NET 1 28th Feb 2008 09:36 PM
userDs1.EnforceConstraints problem Britney Microsoft ASP .NET 0 15th Sep 2005 03:03 PM
ACCESS relations: table clones doesn't keep relations =?Utf-8?B?U3VwZXJib3k=?= Microsoft Access 1 19th Jul 2005 10:57 PM
How to set EnforceConstraints on a datatable? W.G. Rowland Microsoft ADO .NET 2 11th Sep 2004 07:36 PM
Applying DeleteRule even though EnforceConstraints is false? Ed Microsoft ADO .NET 3 14th Jan 2004 03:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:00 AM.