Difference between datareader and dataset?
Answer Posted / ravinderreddy kothakapu
Dataset:
1)Dataset is a inmemory database for client application
process and it will contain more number of tables.
2)Dataset supports manipulations.
3)Dataset is a independent component in ADO.NET.
4)Dataset is a purly disconnected architecture with XML file
integration.XML file integration supports cross platform
independence.
5)Dataset supports bidirectional navigation.
6)Dataset defined multiple tables where contraints can be
applied.
7)Dataset can be persist the data.
Syntax: DataSet ds=new DataSet();
Data Reader:
1)Data Reader is a read only and forward only implimentation
2)Read only means it cannot support
manipulations(insert,delete, update)
3)Forward only means it support record pointer navigation in
forward direction means it is used for only once read
4) we can access only one table
5)Data reader cannot persist the data
6)It is a connected Architecture.
7)Most advantage is Data Reader is faster then Data Adapter.
Syntax:OleDb DataReader dr;
dr=cmd.ExcuteRader()
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is microsoft ado?
Do you use stored procedure in ado.net?
What is the use of adodc?
Define isolation?
What is the difference between statement and preparedstatement interface?
What is the maximum pool size in ado.net connection string?
What are the different methods available under the sqlcommand class to access the data?
What is ado circle?
How to bind the controls(best practice) comboboxes to the data in the dataset?
What is the difference between dataset and datatable?
What is ado data control?
What is the difference between executequery and executenonquery?
Explain what is datagrid with an example?
What are the difference between readonly vs. Const?
Is ado.net an orm?