The TableMappings collection controls how the DataAdapter maps your DataSet
to your database. If you leave a DataAdapter object’s TableMappings
collection empty, call the Fill method, and supply a DataSet as a parameter
without specifying a table name, the DataAdapter will assume that you want to
work with a DataTable called Table.
The TableMappings property returns a DataTableMappingCollection object. This
object contains a collection of DataTableMapping objects. Adding the
following line of code adds a DataTableMapping object to the TableMappings
collection to tell the DataAdapter that it should communicate with a
DataTable called Employees instead:
DataAdapter.TableMappings.Add("Table", "Employees")
Once you’ve created a DataTableMapping object, you can create column
mappings for the table.
--Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Jason Huang" wrote:
Hi,
I am wondering why use the DataTableMapping in SqlDataAdapter when Updating
data.
Would someone give me some advice?
Thanks for help.
Jason