ADO DOT NET (Active Data Object)
[DEFINATION]
It’s a component in dot net framework which helps us to fetch data from
different data source to c# or from C# code to data sources.
ADO DOT NET comprises of 6 components:
1. Connection- Compulsory
2. Command - Compulsory
3. Data Reader
4. Data Adapter
5. Data Set
6. Data View
2. Command - Compulsory
3. Data Reader
4. Data Adapter
5. Data Set
6. Data View
In these 6 components 2 components are compulsory
(connection and command)
Connection
Object - this object is needed to connect to data source like Sql-Server,
Oracle, MySql etc to use this object at least two things are required.
a. Data
source- where database is located either in local host or on remote host.
b. Security
credentials -like windows authentication, user id and password.
Command
Object- Sql syntaxes are written here and it helps to execute the Sql query.
Data Reader - [Connected, Read Only and Forward Only Record Set]
Data Reader - [Connected, Read Only and Forward Only Record Set]
Data
Adapter - It’s
bridge between data source and dataset. It actually fills the dataset with data
coming from database.
Data Set It’s a disconnected record set which can be browsed forth and back direction and can also be updated.
Data Set It’s a disconnected record set which can be browsed forth and back direction and can also be updated.
Difference
B/W DataReader and DataSet
#
|
DataReader DataSet
| |
1.
|
Its
collection of connected records Its
collection of disconnected records.
| |
2.
|
It
can only be accessed in forward mode It
can be accessed in forward and backward mode.
| |
3.
|
Records
in DataReader cannot be updated Records
in DataSet can be updated.
|
No comments:
Post a Comment