DataAdapter
SqlDataAdapter internal data acquisition via SqlDataReader
SqlDataAdapter da = new SqlDataAdapter ();
DataSet dataset=new DataSet ();
DataSet. Tables.add ("Z");
DataSet. Tables.add ("Z1");
Fill Z Table
Da. Fill (DataSet, "Z");
Fill A2 Table
Da. Fill (DataSet, "A2");
. NET Framework
. Net Data Provider namespaces
SQL Server System.Data.SqlClient
Ole DBSystem.Data.OleDb
ODBCSystem.Data.Odbc
OracleSystem.Data.OracleClient
OleDbConnection can connect to SQL Server,access,oracle,my SQL (requires ODBC driver)
Full ODBC includes:
ODBC Administrator (Adninistrator)
Driver Manager (DriverManager)
OdBC Driver:
A dynamic-link library (DLL) that enables ODBC-enabled applications, such as Excel, to access ODBC data sources. Each ODBC driver targets a database management system (DBMS), such as SQL Server, Access, and so on.
ODBC (opendatabaseconnectivity, open Database interconnect) is an integral part of the database in the Microsoft Open Service Architecture (wosa,windowsopenservicesarchitecture), which sets up a set of specifications
and provides a set of standard APIs (application programming interfaces) for database access. These APIs use SQL to accomplish most of their tasks. ODBC itself also provides support for the SQL language, which allows users to send SQL statements directly to ODBC.
An ODBC-based application operates on a database that does not rely on any DBMS, does not interact directly with the DBMS, and that all database operations are done by the corresponding DBMS's ODBC driver. Other words
Both the FoxPro, access, and Oracle databases can be accessed using ODBCAPI. Thus, the greatest advantage of ODBC is the ability to handle all databases in a unified manner
DataAdapter and ODBC