Question on DataAdapter.Fill(DataSet) method

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How this method knows whether to add a new DataTable or update an existing
DataTable? Is it determined by TableName? If it is, how can it knows the
TableName?
 
Hi,
The method takes the table to which you have connected through the
connedtion string.
You can even specify the table name with the Dataset in the method

This is wht all I Know

Rgds
pramod
 
From the .NET docs for the DataAdapter.Fill(DataSet) method:

Adds or refreshes rows in the DataSet to match those in the data source
using the DataSet name, and creates a DataTable named "Table".

It assumes there is a DataTable object present called "Table" or
it will create one.

If you need to specifiy an actual table name then you probably
need to be using one of the provider-specific versions if you
can, i.e. SqlDataAdapter, OracleDataAdapter, etc.
 
Back
Top