Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataAdapter.Fill vs DataAdapter.FillSchema and new row
Message
 
À
22/11/2002 14:07:43
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00725935
Message ID:
00725956
Vues:
9
Hi Rex,

The FillSchema method will set the AutoIncrement, AllowDBNull, and MaxLength properties on the columns returned and will also create a primary key on the resulting DataTable if the database indicates that a column or set of columns represents a primary or unique key.

The Fill method, by default does not fetch this information because this information could be costly and may not be needed by the developer. If you need that information with the Fill, you can use the MissingSchemaAction property.


>All,
>
>I am loading a dataset for adding new records. When I use FillSchema and try to add a new row to the DataSet, I get a message that a column cannot be null, but if I use Fill with a parameter that is not in the table and use the same new row method it works. What is the difference?
>
>TIA
>
>Rex
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform