Oracle 和 ADO.NETOracle and ADO.NET

备注

System.Data.OracleClient 中的类型已过时。The types in System.Data.OracleClient are deprecated. 当前版本的 .NET Framework 仍支持这些类型,但以后的版本会将这些类型删除。The types remain supported in the current version of.NET Framework but will be removed in a future release. Microsoft 建议您使用第三方 Oracle 提供程序。Microsoft recommends that you use a third-party Oracle provider.

本节介绍特定于 Oracle .NET Framework 数据提供程序的功能和行为。This section describes features and behaviors that are specific to the .NET Framework Data Provider for Oracle.

用于 Oracle 的 .NET Framework 数据提供程序使用 oracle 客户端软件提供的 Oracle 调用接口(OCI)来访问 Oracle 数据库。The .NET Framework Data Provider for Oracle provides access to an Oracle database using the Oracle Call Interface (OCI) as provided by Oracle Client software. 数据提供程序的功能与 SQL Server、OLE DB 和 ODBC 的 .NET Framework 数据提供程序的功能类似。The functionality of the data provider is designed to be similar to that of the .NET Framework data providers for SQL Server, OLE DB, and ODBC.

若要使用适用于 Oracle 的 .NET Framework 数据提供程序,应用程序必须引用 System.Data.OracleClient 命名空间,如下所示:To use the .NET Framework Data Provider for Oracle, an application must reference the System.Data.OracleClient namespace as follows:

Imports System.Data.OracleClient  
using System.Data.OracleClient;  

在编译代码时还必须包括对该 DLL 的引用。You also must include a reference to the DLL when you compile your code. 例如,如果编译的是 C# 程序,命令行中应包括:For example, if you are compiling a C# program, your command line should include:

csc /r:System.Data.OracleClient.dll  

本节内容In This Section

系统要求System Requirements
描述使用适用于 Oracle 的 .NET Framework 数据提供程序的要求,并介绍使用它时要注意的一些问题。Describes requirements for using the .NET Framework Data Provider for Oracle, and describes a number of issues to be aware when using it.

Oracle BFILEsOracle BFILEs
描述用于使用 Oracle BFILE 数据类型的 OracleBFile 类。Describes the OracleBFile class, which is used to work with the Oracle BFILE data type.

Oracle LOBsOracle LOBs
描述用于使用 Oracle LOB 数据类型的 OracleLob 类。Describes the OracleLob class, which is used to work with Oracle LOB data types.

Oracle REF CURSORsOracle REF CURSORs
描述对 Oracle REF CURSOR 数据类型的支持。Describes support for the Oracle REF CURSOR data type.

OracleTypesOracleTypes
描述可以用于使用 Oracle 数据类型的结构,包括 OracleNumberOracleStringDescribes structures you can use to work with Oracle data types, including OracleNumber and OracleString.

Oracle 序列Oracle Sequences
说明对检索服务器生成的 Oracle 键序列值的支持。Describes support for retrieving the server-generated key Oracle Sequence values.

Oracle 数据类型映射Oracle Data Type Mappings
列出 Oracle 数据类型及其与 OracleDataReader 的映射。Lists Oracle data types and their mappings to the OracleDataReader.

Oracle 分布式事务Oracle Distributed Transactions
描述 OracleConnection 对象如何自动在现有分布式事务中登记(如果确定某个事务是活动的)。Describes how the OracleConnection object automatically enlists in an existing distributed transaction if it determines that a transaction is active.

保证 ADO.NET 应用程序的安全Securing ADO.NET Applications
描述使用 ADO.NET 时的安全编码做法。Describes secure coding practices when using ADO.NET.

数据集、数据表和数据视图DataSets, DataTables, and DataViews
说明如何创建和使用 DataSets、类型化 DataSetsDataTablesDataViewsDescribes how to create and use DataSets, typed DataSets, DataTables, and DataViews.

在 ADO.NET 中检索和修改数据Retrieving and Modifying Data in ADO.NET
说明如何使用 ADO.NET 中的数据。Describes how to work with data in ADO.NET.

SQL Server 和 ADO.NETSQL Server and ADO.NET
描述如何使用 SQL Server 特定的功能。Describes how to work with features and functionality that are specific to SQL Server.

DbProviderFactoriesDbProviderFactories
描述用于在 ADO.NET 中编写与提供程序无关的代码的一般类。Describes generic classes that allow you to write provider-independent code in ADO.NET.

另请参阅See also