PC Review


Reply
Thread Tools Rate Thread

Applying DeleteRule even though EnforceConstraints is false?

 
 
Ed
Guest
Posts: n/a
 
      14th Jan 2004
Hi!

Is it bug or didn't I get it right, that when
DataSet.EnforceConstraints==false no Rules (in
ForeignKeyConstraints) are applied? MSDN
says: "Constraints are not enforced unless the
EnforceConstraints property is set to true." (c) but I
see, that when I remove row in parent table (through
DataRowCollection.Romove), related rows in child table are
also removed even though EnforceConstraints is false...
Bug or feature?

Thanks!
 
Reply With Quote
 
 
 
 
Miha Markic
Guest
Posts: n/a
 
      14th Jan 2004
Hi Ed,

This is handled separately I guess - it is a matter of DataRelation and
Rules.
ForeignKeyConstraint defines two rules in this regard: InsertRule and
UpdateRule.
Both of them are still enforeced, however you might temporarily disable
them.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Ed" <(E-Mail Removed)> wrote in message
news:098001c3daa9$049eccb0$(E-Mail Removed)...
> Hi!
>
> Is it bug or didn't I get it right, that when
> DataSet.EnforceConstraints==false no Rules (in
> ForeignKeyConstraints) are applied? MSDN
> says: "Constraints are not enforced unless the
> EnforceConstraints property is set to true." (c) but I
> see, that when I remove row in parent table (through
> DataRowCollection.Romove), related rows in child table are
> also removed even though EnforceConstraints is false...
> Bug or feature?
>
> Thanks!



 
Reply With Quote
 
Guest
Posts: n/a
 
      14th Jan 2004
Thank you! But how can I disable them besides setting
DeleteRule to None? Is there the way to disable all
ForeignKeyConstraint at once?

>-----Original Message-----
>Hi Ed,
>
>This is handled separately I guess - it is a matter of

DataRelation and
>Rules.
>ForeignKeyConstraint defines two rules in this regard:

InsertRule and
>UpdateRule.
>Both of them are still enforeced, however you might

temporarily disable
>them.
>
>--
>Miha Markic - RightHand .NET consulting & software

development
>miha at rthand com
>www.rthand.com
>
>"Ed" <(E-Mail Removed)> wrote in

message
>news:098001c3daa9$049eccb0$(E-Mail Removed)...
>> Hi!
>>
>> Is it bug or didn't I get it right, that when
>> DataSet.EnforceConstraints==false no Rules (in
>> ForeignKeyConstraints) are applied? MSDN
>> says: "Constraints are not enforced unless the
>> EnforceConstraints property is set to true." (c) but I
>> see, that when I remove row in parent table (through
>> DataRowCollection.Romove), related rows in child table

are
>> also removed even though EnforceConstraints is false...
>> Bug or feature?
>>
>> Thanks!

>
>
>.
>

 
Reply With Quote
 
Miha Markic
Guest
Posts: n/a
 
      14th Jan 2004
Hi,

Not that I know.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

<(E-Mail Removed)> wrote in message
news:0acd01c3dab1$e0607430$(E-Mail Removed)...
> Thank you! But how can I disable them besides setting
> DeleteRule to None? Is there the way to disable all
> ForeignKeyConstraint at once?
>
> >-----Original Message-----
> >Hi Ed,
> >
> >This is handled separately I guess - it is a matter of

> DataRelation and
> >Rules.
> >ForeignKeyConstraint defines two rules in this regard:

> InsertRule and
> >UpdateRule.
> >Both of them are still enforeced, however you might

> temporarily disable
> >them.
> >
> >--
> >Miha Markic - RightHand .NET consulting & software

> development
> >miha at rthand com
> >www.rthand.com
> >
> >"Ed" <(E-Mail Removed)> wrote in

> message
> >news:098001c3daa9$049eccb0$(E-Mail Removed)...
> >> Hi!
> >>
> >> Is it bug or didn't I get it right, that when
> >> DataSet.EnforceConstraints==false no Rules (in
> >> ForeignKeyConstraints) are applied? MSDN
> >> says: "Constraints are not enforced unless the
> >> EnforceConstraints property is set to true." (c) but I
> >> see, that when I remove row in parent table (through
> >> DataRowCollection.Romove), related rows in child table

> are
> >> also removed even though EnforceConstraints is false...
> >> Bug or feature?
> >>
> >> Thanks!

> >
> >
> >.
> >



 
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
VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007 Matt Simpson Microsoft Excel Programming 0 6th Aug 2007 08:11 PM
userDs1.EnforceConstraints problem Britney Microsoft ASP .NET 0 15th Sep 2005 03:03 PM
Does enforceconstraints mean errors or relations?? bjako Microsoft ADO .NET 1 3rd Mar 2005 12:36 AM
How to set EnforceConstraints on a datatable? W.G. Rowland Microsoft ADO .NET 2 11th Sep 2004 07:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:53 PM.