|
-
Mar 6th, 2012, 06:45 PM
#14
Re: [RESOLVED] refresh combobox values after updating its datatable and adapter
 Originally Posted by TrippingCobras
I think you guys are missing the big picture. There is a difference between a dataset and the datatable.
There's a difference alright, but not the one you seem to think there is. A DataSet is essentially an in-memory representation of a database. A DataTable is basically an in-memory representation of a database table. Just as a database contains tables and relations between them, so a DataSet contains DataTables and DataRelations. A DataSet has a Tables property, which is a collection of DataTables, and a Relations property, which is a collection of DataRelations.
When you call Fill on a DataAdapter or TableAdapter you are populating a DataTable. Even if you pass a DataSet as an argument, you are populating one of the DataTables in its Tables collection. When you call Update on a DataAdapter or TableAdapter you are saving changes from a DataTable. Even if you pass a DataSet as an argument, you are saving changes from one of the DataTables in its Tables collection.
Just as a database table has columns to describe the data and rows to contain it, so a DataTable has a Columns property, which is a collection of DataColumns, and a Rows property, which is a collection of DataRows.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|