Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Missing PrimaryKey exception
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01206288
Message ID:
01207455
Vues:
20
Mario,

>I believe that MM tries to create the Pk during the FillDataSet on the following line of code, am I wrong?. However, at the end of the filldataset no PK is created on the underlying table.
>
>
>// Specify that column and primary key information is added to the DataTable
> dbAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
>
>

This is an ADO.NET feature that pulls the primary key information back from the database when issuing a SELECT command. If you examine the DataTable afterwards, does its PrimaryKey property contain anything?

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform