Sujit
Sujit

Reputation: 3767

DbDataAdapter vs DataAdapter

I keep hearing DbDataAdapter this days. It is an abstract class of adapter.

But When should i prefer DbDataAdapter over DataAdapter, and what is the difference between DbDataAdapter and DataAdapter(on performance and functionality)?

Upvotes: 2

Views: 1714

Answers (1)

JleruOHeP
JleruOHeP

Reputation: 10376

As you said, DbDataAdapter is an abstract class, that inherits from DataAdapter. As said in MSDN:

Inheritors of DbDataAdapter implement a set of functions to provide strong typing, but inherit most of the functionality needed to fully implement a DataAdapter.

And for perfomance, here:

If you are connecting to a SQL Server database, you can increase overall performance by using the SqlDataAdapter along with its associated SqlCommand and SqlConnection objects.For OLE DB-supported data sources, use the DataAdapter with its associated OleDbCommand and OleDbConnection objects.For ODBC-supported data sources, use the DataAdapter with its associated OdbcCommand and OdbcConnection objects.For Oracle databases, use the DataAdapter with its associated OracleCommand and OracleConnection objects.

Upvotes: 2

Related Questions