Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataTable.PrimaryKey retrieves Clustered Keys?
Message
De
11/05/2005 16:13:06
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
DataTable.PrimaryKey retrieves Clustered Keys?
Divers
Thread ID:
01013143
Message ID:
01013143
Vues:
72
We're using MissingSchemaAction.AddWithKey and suddenly had Rows.Find blow up because the value passed didn't match the table PK constraint columns.

I figured out what was happening because I realized that we just changed some of our indexes and it turned out we have a new clustered key that matches the columns ADO.NET thinks comprises a composite "PK" constraint. (This is one of those times where our primary key is not clustered -- trying to optimize our indexes).

I've searched high and low for this behavior, and any work arounds... other than to just add code that sets the DataTable.PrimaryKeys to what we need at any given moment... or settings I've somehow missed.

Seems strange, though, that ADO.NET would "mistake" the clustered key for the primary one... especially where it's using it to set a "primary" constraint?

Am I missing something here? Maybe the answer's "out there" and I'm just using bad search text?

Thanks for any help,
---J
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform