打印本文 打印本文 关闭窗口 关闭窗口
第一课 ADO.NET简介(翻译)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3234  更新时间:2009/4/23 10:36:01  文章录入:mintao  责任编辑:mintao
a common way to interact with specific data sources or protocols.  The library APIs have prefixes that indicate which provider they support.

Provider Name

API Prefix

Data Source Description

ODBC Data Provider

Odbc

Data Sources with an ODBC interface.  Normally older data bases.

OleDb Data Provider

OleDb

Data Sources that expose an OleDb interface, i.e. Access or Excel.

Oracle Data Provider

Oracle

For Oracle Data Bases.

SQL Data Provider

Sql

For interacting with Microsoft SQL Server.

Borland Data Provider

Bdp

Generic access to many data bases such as Interbase, SQL Server, IBM DB2, and Oracle.

 

1.  ADO.NET Data Providers 是允许与特殊数据库或者协议采用公共方式进行交互的一组类库。类库的API前缀说明了它支持的provider

Provider

API 前缀

Data Source 描述

ODBC Data Provider

Odbc

使用ODBC接口的数据源,通常是老式数据源

OleDb Data Provider

OleDb

提供OleDb接口的数据源,比如Acess或者Excel

Oracle Data Provider

Oracle

用于Oracle数据库

SQL Data Provider

Sql

用于Microsoft SQL Server.

Borland Data Provider

Bdp

许多数据库的公共存取方式,比如Interbase, SQL Server, IBM DB2, and Oracle.

 

An example may help you to understand the meaning of the API prefix.  One of the first ADO.NET objects you''''ll learn about is the connection object, which allows you to establish a connection to a data source.  If we were using the OleDb Data Provider to connect to a data source that exposes an OleDb interface, we would use a connection object named OleDbConnection.  Similarly, the connection object name would be prefixed with Odbc or Sql for an OdbcConnection object on an Odbc data source or a SqlConnection object on a SQL Server data base, respectively.  Since we are using MSDE in this tutorial (a scaled down version of SQL Server) all the API objects will have the Sql prefix.  i.e. SqlConnection.

一个实例可以帮助你了解API前缀的意义。在最开始你将学习到第一个ADO.NET对象是连接对象(connection object),它允许你建立与数据源的连接。如果我们使用OleDb数据提供器连接一个暴露OleDb接口的数据源,那么我们将使用OleDbConnection。同样,连接对象的名字也会根据它连接Odbc数据源还是SQL Server数据源而分别加上Odbc或者Sql前缀,即OdbcConnection或SqlConnection。因为我们在本指南中使用的是MSDE(一个缩微版的SQL Server),所以所有的API对象都会由Sql前缀,即SqlConnection。

ADO.NET Objects

ADO.NET对象

上一页  [1] [2] [3] [4]  下一页

打印本文 打印本文 关闭窗口 关闭窗口