Professional Documents
Culture Documents
ADO
It is the single library for accessing any type
of data, i.e universal data access.
Drawbacks
1.ADO and OLEDB are based on
COM(binary standard) implementation.so it
is platform dependent.
2.It does not support complete disconnected
architecture
3. .It does not support integrating with XML
4.It requires performance improvement.
Connected & disconnected architecture
When the application is maintain data base
table information by maintain connectivity
with data base server then it is called
connected architecture
When the application is maintain data base
table information without maintain
connectivity with data base server then it is
called disconnected architecture
ADO.NET
ADO.NET is nothing but a library called as
system.data.dll.
ADO.NET comes with two parts,
1. Managed data provider(It provides
connected architecture)
2. Dataset(It goes with data storage & it
SQLServe
Oracle r
(Or)
-----
Oracle msdaora.1
SqlServer sqloledb.1
JetEngine microsoft.jet.oledb.4.0
ODBC msdasql.1
In .NET ODBC option is disabled with
managed provider for OLEDB.
OLEDB COMMAND
Syntax:
Dim cmd as new oledbcommand(“select *
from emp “,con)
(or)
Data Reader
dr=cmd.executereader ()
It will send select statement to the database
server.
Database sever will execute select statement
and returns all the records to the client
machine.
The records will be stored within temporary
memory storage.
Data reader acts as a reference to the
memory storage.
Methods:
TRANSACTION HANDLING
A transaction can be defined as a unit of
manipulations on the basis of all or none.
Application
DATASET
Dataset can be defined as in memory storage
for the client application, which acts as a
database to the client application. It is going
to be purely disconnected architecture.
DATA ADAPTER
Data adapter acts as a mediator between
dataset and the database server.
This will perform two things,
1.Storing the database table information into
dataset.
2.the changes made within dataset (i.e., insert,
update & delete) will be updated to the
database server.
Data Adapter will contain four command
objects to perform the above things.
Data Adapter
XML
Application DATASET
Storag
e
Select Command
Data Reader Insert Command
Command Update Command
Delete Command
Data
Connection Storag
e
Dim ds as dataset
Dim da as new SqlDataAdapter(“select *
from emp”,con)
Syntax:
dataset ds = new dataset();
SqlDataAdapter da = new SqlDataAdapter
(“select * from emp”, con)
Da.fill (ds,”emp”)
DEPT EMP
DA2
DA1
A
DATASET
(One To One relationship is maintained by
each data adapter with the corresponding
table,
So each time it is required a new data adapter
to perform the changes in a new table)
sqlcommandbuilder cb = new
sqlcommandbuilder()
cb=sqlcommandbuilder (da)
It will execute constructor of
SQLCommandBuilder and generate insert,
delete and update commands.
Commandbuilderclass will not generate
delete command and update command, if the
backend table is not having primary key.
Data Binding: -