Whats the difference between IDataAdapter and IDbDataAdapter?

C

Craig Deelsnyder

Showjumper said:
Whats the diff between the 2 and when do you use one and not the other?
from the docs:

The IDataAdapter interface allows an inheriting class to implement a
DataAdapter class, which represents the bridge between a data source and
a DataSet.

The IDbDataAdapter inherits from IDataAdapter and is specific to when
you're using a relational database as your data source. Data sources
don't have to be databases, you could have adapters to other external
systems, an XML file, other data files could be data sources as well.

Usually you don't use the interfaces directly (as a type) unless your
code could be one of many different types of datasources or DBs at the
same time. For example, if you have code that needs to run using
SQLServer and/or Oracle in your current environment, and you want it to
be switchable (the same code block run with either type of database).

Or if you have a new type of datasource you'd like to add
DataSet-related capabilities to interact with, you would create classes
based on these interfaces....
 
S

Showjumper

Thanks Craig
Craig Deelsnyder said:
from the docs:

The IDataAdapter interface allows an inheriting class to implement a
DataAdapter class, which represents the bridge between a data source and
a DataSet.

The IDbDataAdapter inherits from IDataAdapter and is specific to when
you're using a relational database as your data source. Data sources
don't have to be databases, you could have adapters to other external
systems, an XML file, other data files could be data sources as well.

Usually you don't use the interfaces directly (as a type) unless your
code could be one of many different types of datasources or DBs at the
same time. For example, if you have code that needs to run using
SQLServer and/or Oracle in your current environment, and you want it to
be switchable (the same code block run with either type of database).

Or if you have a new type of datasource you'd like to add
DataSet-related capabilities to interact with, you would create classes
based on these interfaces....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top