Chapter8 Working With ADO.net
Chapter8 Working With ADO.net
(ASP.NET)
ADO vs ADO.net
Data Provider
Visual Studio
Running Queries in Visual Studio
INTRODUCING ADO .NET
ADO.NET is the next generation of ActiveX
Data Objects (ADO).
ADO.NET is the technology that .NET
Connection
Command
DataReader
DataAdapter
NAME IN
SYSTEM.DATA. SYSTEM.DATA
TYPE OF
PURPOSE OLEDB .
CLASS
NAMESPACE SQLC
NAMESPACE
Establishes and
manages a
Connection OleDbConnection SQLConnection
connection to a
database.
Carries out an
operation while
Command OleDbCommand SQLCommand
connected to the
database.
Presents a stream
of data
DataReader generated by a OleDbDataReader SQLDataReader
query operation
on a database.
Fetches data from
a database
OleDbDataAdapte SQLDataAdapte
DataAdapter and transfers it
r r
into a DataSet
THE ADO.NET OBJECT MODEL
DataSet
DataTable DataTable
ODBC
ODBC SQL
SQL Server
Server OLE
OLE DB
DB .NET
.NET Oracle
Oracle
Data
Data Provider
Provider Data
Data Provider
Provider Data
Data Provider
Provider Data
Data Provider
Provider
commonly used :
Data source: This indicates the name of the
myConnection)
METHOD OF
PURPOSE
COMMAND OBJECT
from the Add Table dialog, click Add, and then click Close .
RUNNING QUERIES IN VISUAL
STUDIO
3 You’ll now see a handy query-building window. You can
create your query by adding check marks next to the fields
you want, or you can edit the SQL by hand in the lower
portion of the window.
4. When you’re ready to run the query, select Query