SqlDataAdapter serves as a bridge between a
DataSet and SQL Server for retrieving and
saving data. The
SqlDataAdapter provides this bridge by mapping
Fill, which changes the data in the
DataSet to match the data in the data
Update, which changes the data in the data source to match
the data in the
DataSet, using the appropriate Transact-SQL statements
against the data source. The update is performed on a by-row basis. For every
inserted, modified, and deleted row, the
Update method determines the
type of change that has been performed on it (
Depending on the type of change, the
command template executes to propagate the modified row to the data source.
SqlDataAdapter fills a
DataSet, it creates the necessary
tables and columns for the returned data if they do not already exist. However,
primary key information is not included in the implicitly created schema unless
MissingSchemaAction property is set to
AddWithKey. You may
also have the
SqlDataAdapter create the schema of the
primary key information, before filling it with data using
For more information, see Adding Existing Constraints to a
SqlDataAdapter is used in conjunction with
SqlCommand to increase performance when connecting to a SQL Server
SqlDataAdapter also includes the
TableMappings properties to facilitate the
loading and updating of data.
SqlDataAdapter is created, the read/write properties are set
to initial values. For a list of these values, see the
UpdateCommand are generic templates that are
automatically filled with individual values from every modified row through the
ds) here fetches the data from User and fills in the
dt) fetches records from
Users and fills in the
User has been filled by the
DataAdapter.Fill () method.
This overload takes three parameters. The types of parameters are
DataTable. Here first parameter is the starting record, second parameter is the
maximum number of record and the last parameter is the
DataTable where we have to fill the records. The ranges from which the records are to be fetched are
mentioned here using the parameters.
this overload takes four parameters. The types of parameters are
string. The first parameter is the name of the dataset, second parameter is the
starting record number, third parameter is the maximum number of records and
the last parameter is the name of the table.
is filled with all the records of
Users. And then,
method has filled the
nm with the specified range of records.
I like sharing my knowledge and written some non-popular articles. I believe in quality and standards but blames myself for lagging them.
I believe in small things and they makes me happy!