Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataAdapter.Fill vs DataAdapter.FillSchema and new row
Message
 
To
22/11/2002 14:07:43
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00725935
Message ID:
00725956
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform