[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Kevin Dietz

6/25/2002 7:02:00 PM

I'm trying to figure out the role of ODBC .NET data providers in relation to
the ADO.NET architecture.

Do you have to use ODBC.NET in conjunction with ADO.NET, that is, as a data
provider to ADO.NET, or can you drop down to a lower level and use
connections and recordsets directly, without using DataSets, DataAdapters,
and DataTables?

I'm also looking for online help for the ODBC.NET classes.

- Kevin


1 Answer

(Hussein Abuthuraya(MSFT))

6/26/2002 12:18:00 AM

0

Kevin,

ODBC .NET is just a .NET third provider that is used solely if you would like to use ODBC datasources in your ADO.NET application. So it sonsist of set of classes that are
used to comuunicate with the the database and return/send useful data. Those specific classes that are prefixed with ODBC such as OdbcConnection, OdbcCommand,
OdbcDataAdapter, etc.

There are set of generic ADO.NET objects (classes) that are neutral and work with all .NET DataProvider such as DataSets, DataTables, DataViews, etc... So you could
use an OdbcDataAdapter to fill a DataSet or it can be filled from a SqlDataAdapter or an OleDbDataAdapter.

ADO.NET architecture consist of two models to retreive data.

1. Connected model that is used with OdbcDataReader object that read data one row at a time and in one direction.
2. Disconnected Model that is used by DataSets where in a dataset all requested data is retrieved and cached in memory in datatables.

So choosing the right mode depends on your application and what you want to do with the data. For example, If your application is going to read more than one datarow and
then modify it (Add/Delete/Edit) then you need to use the DataSet and DataAdapter.

You need to read more the ADO.NET architecture and how the different objects are related. The MSDN library is a great resource and also the .NET SDK. For specific
information about the ODBC.NET classes, see the local help file located at:

C:\Program Files\Microsoft.NET\Odbc.Net\Odbcref.chm


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.co....