转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 站长学院 >> Web开发 >> 正文
第一课 ADO.NET简介(翻译)         ★★★★

第一课 ADO.NET简介(翻译)

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2545 更新时间:2009/4/23 10:36:01

本文档由李欣蔚(nirvana_li)翻译自http://www.csharp-station.com/,转载请注名出处!
更新日期2006-2-14

Lesson 01: Introduction to ADO.NET

This lesson is an introduction to ADO.NET.  It introduces primary ADO.NET concepts and objects that you will learn about in later lessons.  Here are the objectives of this lesson:

  • 了解什么是ADO.NET
  • 理解什么是data provider
  • 理解什么是connection对象
  • 理解什么是command对象
  • 理解什么是DataReader对象
  • 理解什么是DataSet对象
  • 理解什么是DataAdapter对象

Introduction

ADO.NET is an object-oriented set of libraries that allows you to interact with data sources.  Commonly, the data source is a data base, but it could also be a text file, an Excel spread sheet, or an XML file.  For the purposes of this tutorial, we will look at ADO.NET as a way to interact with a data base.

ADO.NET是一组用于和数据源进行交互的面向对象类库。通常情况下,数据源是数据库,但它同样也能够是文本文件、Excel表格或者XML文件。因为本指南的需要,我们将ADO.NET当作是一种于数据库的交互方式。

As you are probably aware, there are many different types of data bases available.  For example, there is Microsoft SQL Server, Microsoft Access, Oracle, Borland Interbase, and IBM DB2, just to name a few.  To further refine the scope of this tutorial, all of the examples will use SQL Server. 

     你可能已经注意到有许多不同类型的数据库可供使用。比如:Microsoft SQL Server, Microsoft Access, Oracle, Borland Interbase和IBM DB2等。本指南的所有例子都将使用SQL Server。

You can download the Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) here:

从这里可以下载得到Microsoft SQL Server 2000 Desktop Engine (MSDE 2000):

http://www.microsoft.com/sql/msde/downloads/download.asp

MSDE contains documentation on how to perform an installation.  However, for your convenience, here are quick instructions on how to install MSDE:

     MSDE包含了指导如何安装的文档。然而,为了更加方便,下面是如何安装MSDE的快速说明:

http://www.asp.net/msde/default.aspx?tabindex=0&tabid=1

MSDE 2000 is a scaled down version of SQL Server.  Therefore, everything you learn in this tutorial and all code will work with SQL Server.  The examples will use the Northwind database.  This is a tutorial is specifically for ADO.NET.  MSDE is not part of ADO.NET, but it is one of the many data sources you can interact with by using ADO.NET If you need help with MSDE 2000, I refer you to the Microsoft Web site, where you can find pertinent information on licensing and technical assistance:

http://www.microsoft.com/sql/msde/

MSDE 2000是SQL Server的缩微版。因此,本指南中所有的内容和代码都是和SQL Sever有关的。实例将会使用Northwind数据库。这是对ADO.NET的特殊化的指南。MSDE并不是ADO.NET的一部分,但却是使用与ADO.NET的数据源中的一种。如果需要MSDE 2000的帮助,可以在Microsoft站点早到合适的关于许可以及技术支持的信息:

Data Providers

数据提供程序

We know that ADO.NET allows us to interact with different types of data sources and different types of data bases.  However, there isn''''t a single set of classes that allow you to accomplish this universally.  Since different data sources expose different protocols, we need a way to communicate with the right data source using the right protocol.  Some older data sources use the ODBC protocol, many newer data sources use the OleDb protocol, and there are more data sources every day that allow you to communicate with them directly through .NET ADO.NET class libraries. 

     ADO.NET允许和不同类型的数据源以及数据库进行交互。然而并没有与此相关的一系列类来完成这样的工作。因为不同的数据源采用不同的协议,所以对于不同的数据源必须采用相应的协议。一些老式的数据源使用ODBC协议,许多新的数据源使用OleDb协议,并且现在还不断出现更多的数据源,这些数据源都可以通过.NET的ADO.NET类库来进行连接。

ADO.NET provides a relatively common way to interact with data sources, but comes in different sets of libraries for each way you can talk to a data source.  These libraries are called Data Providers and are usually named for the protocol or data source type they allow you to interact with.  Table 1 lists some well known data providers, the API prefix they use, and the type of data source they allow you to interact with.

ADO.NET提供与数据源进行交互的相关的公共方法,但是对于不同的数据源采用一组不同的类库。这些类库称为Data Providers,并且通常是以与之交互的协议和数据源的类型来命名的。表1列处了一些常见的data providers,以及它们所使用的API前缀,和允许进行交互的数据源类型。

Table 1.  ADO.NET Data Providers are class libraries that allow

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


[C语言系列]NET 中C#的switch语句的语法  [系统软件]托拽Explore中的文件到VB.net的窗口
[系统软件]Boost库在XP+Visual C++.net中的安装  [常用软件]新配色面板:Paint.Net3.0RC1官方下载
[常用软件]用内建的“Net Meeting”聊天  [VB.NET程序]Henry的VB.NET之旅(三)—共享成员
[VB.NET程序]Henry的VB.NET之旅(二)—构造与析构  [VB.NET程序]Henry的VB.NET之旅(一)—失踪的窗体
[VB.NET程序]在托盘上显示Balloon Tooltip(VB.NET)  [VB.NET程序]Henry手记-VB.NET中动态加载Treeview节点(二)
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Web开发  · 网页制作
    · 平面设计  · 网站运营
    · 网站推广  · 搜索优化
    · 建站心得  · 站长故事
    · 互联动态
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台