What is the difference between using oledbDataReader and DataAdaptor ?
Which one is best to use ? for fetching data from db…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use ADO.NET either in a generic style (using the interface definitions), which makes it easier to port your app to a new database, or in a DB-specific form.
If you’re using SQL Server and don’t plan to switch, then it’s usually better to stick with the
SqlClientclasses, such asSqlDataAdapterandSqlDataReader.To fetch from a DB, the best option depends in part on where you want to put the data after you read it.
SqlDataAdapter.Fill()is good forDataSetsorDataTables;SqlDataReaderis good for custom classes.SqlDataReaderis probably a bit faster, but it also does less for you.