oracle .net framework,Oracle 的 .NET Framework 数据提供程序的系统要求

Oracle 的 .NET Framework 数据提供程序的系统要求System Requirements for the .NET Framework Data Provider for Oracle

03/30/2017

本文内容

Oracle .NET Framework 数据提供程序需要 Microsoft 数据访问组件 (MDAC) 2.6 版或更高版本。The .NET Framework Data Provider for Oracle requires Microsoft Data Access Components (MDAC) version 2.6 or later. 建议使用 MDAC 2.8 SP1。MDAC 2.8 SP1 is recommended.

还必须安装 Oracle 8i Release 3 (8.1.7) 客户端或更高版本。You must also have Oracle 8i Release 3 (8.1.7) Client or later installed.

Oracle 9i 版本之前的 Oracle 客户端软件无法访问 UTF16 数据库,因为 UTF16 是 Oracle 9i 中的一项新功能。Oracle Client software prior to version Oracle 9i cannot access UTF16 databases because UTF16 is a new feature in Oracle 9i. 要使用此功能,必须将客户端软件升级到 Oracle 9i 或更高版本。To use this feature, you must upgrade your client software to Oracle 9i or later.

使用 Oracle 数据提供程序和 Unicode 数据Working with the Data Provider for Oracle and Unicode Data

下面是使用 Oracle 和 Oracle 客户端库的 .NET Framework 数据提供程序时应考虑的与 Unicode 相关的问题列表。The following is a list of Unicode-related issues that you should consider when working with the .NET Framework Data Provider for Oracle and Oracle client libraries. 有关更多信息,请参见 Oracle 文档。For more information, see your Oracle documentation.

在连接字符串属性中设置 Unicode 值Setting the Unicode Value in a Connection String Attribute

在使用 Oracle 时,可以使用连接字符串属性When working with Oracle, you can use the connection string attribute

Unicode=True

在 UTF-16 模式下初始化 Oracle 客户端库。to initialize the Oracle client libraries in UTF-16 mode. 这样可以使 Oracle 客户端库接受 UTF-16(与 UCS-2 非常类似),而不是多字节字符串。This causes the Oracle client libraries to accept UTF-16 (which is very similar to UCS-2) instead of multi-byte strings. 这样,Oracle 数据提供程序始终可以使用任何 Oracle 代码页,不需要进行其他转换工作。This allows the Data Provider for Oracle to always work with any Oracle code page without additional translation work. 只有使用 Oracle 9i 客户端与包含备选字符集 AL16UTF16 的 Oracle 9i 数据库进行通信时,此配置才有效。This configuration only works if you are using Oracle 9i clients to communicate with an Oracle 9i database with the alternate character set of AL16UTF16. 当 Oracle 9i 客户端与 Oracle 9i 服务器通信时,需要额外的资源将 Unicode CommandText 值转换为 Oracle9i 服务器使用的相应多字节字符集。When an Oracle 9i client communicates with an Oracle 9i server, additional resources are required to convert the Unicode CommandText values to the appropriate multi-byte character set that the Oracle9i server uses. 如果确定已通过将 Unicode=True 添加到连接字符串中而拥有了安全的配置,则可以避免此问题。This can be avoided when you know that you have the safe configuration by adding Unicode=True to your connection string.

混合版本的 Oracle 客户端和 Oracle 服务器Mixing Versions of Oracle Client and Oracle Server

如果将服务器的区域字符集指定为 AL16UTF16 (oracle 9i) 的默认 设置,oracle 8i 客户端将无法访问 NVARCHAR2 或 NCLOB 数据。Oracle 8i clients cannot access NCHAR, NVARCHAR2, or NCLOB data in Oracle 9i databases when the server's national character set is specified as AL16UTF16 (the default setting for Oracle 9i). 因为直到 Oracle 9i 才引入对 UTF-16 字符集的支持,Oracle 8i 客户端无法读取。Because support for the UTF-16 character set was not introduced until Oracle 9i, Oracle 8i clients cannot read it.

使用 UTF-8 数据Working with UTF-8 Data

要设置备选字符集,将注册表项 HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID\NLS_LANG 设置为 UTF8。To set the alternate character set, set the Registry Key HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID\NLS_LANG to UTF8. 有关更多信息,请参见适合您的平台的 Oracle 安装说明。See the Oracle Installation notes on your platform for more information. 默认设置为安装 Oracle 客户端软件所使用的语言的主要字符集。The default setting is the primary character set of the language from which you are installing the Oracle Client software. 如果设置的语言与所连接的数据库的国家语言字符集不匹配,将使参数和列绑定使用主要数据库字符集发送或接收数据,而不是使用国家字符集。Not setting the language to match the national language character set of the database to which you are connecting will cause parameter and column bindings to send or receive data in your primary database character set, not the national character set.

OracleLob 只能更新完整字符。OracleLob Can Only Update Full Characters.

出于可用性原因, OracleLob 对象继承自 .NET Framework Stream 类,并提供 ReadByte 和 WriteByte 方法。For usability reasons, the OracleLob object inherits from the .NET Framework Stream class, and provides ReadByte and WriteByte methods. 它还实现了对 Oracle LOB 对象的各个部分进行处理的方法,如 CopyTo 和 Erase。It also implements methods, such as CopyTo and Erase, that work on sections of Oracle LOB objects. 与此相反,Oracle 客户端软件提供了许多 Api 来使用字符 LOB s (CLOB 和 NCLOB) 。In contrast, Oracle client software provides a number of APIs to work with character LOB s (CLOB and NCLOB). 但是,这些 API 只适用于完整字符。However, these APIs work on full characters only. 由于这种差异,Oracle 的数据提供程序实现了对 Read 和 ReadByte 的支持,以便以字节的方式处理 utf-16 数据。Because of this difference, the Data Provider for Oracle implements support for Read and ReadByte to work with UTF-16 data in a byte-wise manner. 但是, OracleLob 对象的其他方法只允许全字符操作。However, the other methods of the OracleLob object only allow full-character operations.

请参阅See also

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值