once data is fetched into dataset connection gets closed. but in datareader
connection is always maintained...then why datareader is fast and mainly
recommended ?
Answers were Sorted based on User's Feedback
Answer / hhh
DataSet carry considerable overhead because of relations,
multiple tables,
While DataReader only readony and fawardonly stream of
data, it fatch only one row at a time. thats y its faster
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / abhishek
datareader is forwardonly thus is fast and is mostly used
while retrieving the data from the database.
Is This Answer Correct ? | 5 Yes | 0 No |
Diff B/W DataSet vs DataTable
What is openrowset?
Which object holds only data and does not interact with data source?
Explain executenonquery?
Execute nonquery returns no. of afected rows.So if my stored procedure hav lot of select stmnt, delete stmnt, insert stmnt..then what does execute nonquery returns in this case?
List the 4 common ado.net namespaces?
How to you declare connection strings and how to you make use of web.config ?
What is ole used for?
how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
How to work with disconnected data - the dataset and sqldataadapter?
I loaded the dataset with a table of 10 records. One of the records is deleted from the backend, How do you check whether all the 10 records were present while updating the data(Which event and steps) and throw the exception.
2 Answers Fulcrum Logic, Satyam,
what is ado.net