문제

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)?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top