what is different between SqlDataAdapter and SqlDataReader?.what is different between SqlDataAdapter and SqlDataReader?.these 2 r different from dataadapter and datareader.
-
what is different between SqlDataAdapter and SqlDataReader?.these 2 r different from dataadapter and datareader.
-
what is different between SqlDataAdapter and SqlDataReader?.these 2 r different from dataadapter and datareader.
No these two are same.Dataadapter is used when u want to do insert or update or delete. And if u want the records for reading purpose then it is better to use datareader. Datareader is fast in this case. Datareader directly interacts with the Database. Dataadapter works with the dataset. And dataadapter interacts with the database. and fills the records in the dataset.Dataadapter is used only when you use dataset.And dataaset uses disconnected architecture and datareader does not.This reason makes dataset more useful.
Mohinder Singh
-
what is different between SqlDataAdapter and SqlDataReader?.these 2 r different from dataadapter and datareader.
SqlDataAdapter is a version of the DataAdapter that is specific for use with Sql Server. For other databases an OleDbDataAdapter or OdbcDataAtapter would be appropriate. Both of these classes inherit from the DataAdapter class, which providesthe abstract model for both. Similarly, SqlDataReader is an implementation of (inherits from) DataReader, one which is specifically for use with SQL Server databases. DataAdatpters are disigned to serve as the bridge between a database and the in memory representastion classes DataSet and DataTable. The provide mechanisms for populating Datasets with the data, metadata and relationships form a database, and allow one to work with this in memory data while disconnected from the database. Mechanisms fro reconnecting and updating the database are also provided. DataReaders are designed for rapid reading of data from a database. The data is provided as a set of records which must be read in order and can only be read once without closing and restarting the datareader. All of this information (in much more detail) is available from MSDN[^]
-
what is different between SqlDataAdapter and SqlDataReader?.these 2 r different from dataadapter and datareader.
Hi, ADO.Net implements disconnected architecture with sqlDataAdapter and Dataset,SqlDataAdapter is disconnected from datasorce it establishes connection when required once data processing is finished it disconnect from DB and data is dumped into Dataset. SqlDataAdappter is used for all DML command by defaults it is selectcommand mode. SqlDataReader is connection oriented it reads the records on at a time mean while it reads all records. we can use DataReader only for SelectCommand. we cann't instantiate DataReader with the help of executeReader we can SqldataReader used mainly for populate data to the controls, when we need to gothough all the records in data I hope this will clear u r doubt for some extend "Winning is not our dream,It our habit"