Professional Documents
Culture Documents
DataSet
Business to Business
ODBC Driver
ODBC
ODBC
Connection
RDBMS
OLE DB Provider
Application
Command
OLE DB
OLE DB
RDBMS
Data Reader
SQL Server
Data Adapter
ADO.NET Objects
Connection
Connects to data source
Command
Executes SELECT, INSERT, UPDATE
and DELETE commands
Data Reader
Forward-only, read-only stream of
data
Data Adapter
Connects a DataSet to a data source
Working With Data
If you need full data access, use
DataAdapter object (SQLDataAdapter,
OleDbDataAdapter)
DataAdapter represents a set of data
commands and a database
connection
Fills a DataSet (using Fill method)
Updates data (using Update method)
Working With Data
Use Fill method to fill the DataSet
DataSet provides local cache for
disconnected data
All data marshaled as XML
Make changes in cached data
Use Update method to write
changes from cached data back to
data source
Getting Data Into A DataSet
DataAdapter has four Command properties
SelectCommand/DeleteCommand
InsertCommand/UpdateCommand
Each property contains a Command object
DataAdapter uses these Command objects
for selecting, updating, and so on
Call the Update method to change data
Call the Fill method to execute the
SelectCommand
Fills a DataSet
DataSet Object
Relational views of data DataSet
Tables
Contains tables, columns, Table
rows, constraints, Columns