Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Rows and Constraints
Message
De
20/08/2003 16:38:24
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00819978
Message ID:
00821995
Vues:
19
Weird, Rick. I'm curious as to why we see different behavior even though we're both using "default behavior". There's obviously *something* that we've done differently, but at this point I don't have a clue. Oh well ...

~~Bonnie

>>Nope, the default for MissingSchemaAction is Add. It's the AddWithKey option that sets PK's and all that ... so, I don't think that's it. I bet you use DataRelations in your DataSets, which according to the docs (I'm looking at "Adding Constraints to a Table"), automatically adds ForeignKeyConstraints and UniqueConstraints to your DataTables. I'm not using DataSet DataRelations, so I'm guessing that that's why my default behavior is slightly different than your default behavior.
>
>No, I don't use relations because all my relationships are set via object containership.
>
>I can reliably dupe this by adding a couple of rows and trying to set the PK field to the same value when they are inside of a DataTable and I will get an exception.
>
>There's lots of power there, but it's so woefully underdocumented it really bites...
>
>+++ RIck ---
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform