OLEDB v/s ODBC [英] OLEDB v/s ODBC

查看:73
本文介绍了OLEDB v/s ODBC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OLEDB和ODBC有什么区别?我什么时候使用哪个,我怎么知道我在看的是OLEDB驱动程序与ODBC驱动程序?

What is the difference between OLEDB and ODBC? When do I use which and how do I know what I am looking at is a OLEDB driver v/s an ODBC driver?

推荐答案

OLEDB和ODBC是两个不同的数据库API. ODBC是较旧的标准,实际上并不特定于Windows-您可以获取基于Unix的ODBC库. OLEDB是用于数据库连接的基于COM的API.

OLEDB and ODBC are two different database API's. ODBC is an older standard and is actually not specific to windows - you can get Unix-based ODBC libraries. OLEDB is a COM-based API for database connections.

如果您使用的数据库不带有本机OLEDB驱动程序,则有一个用于将ODBC与OLEDB前端包装在一起的驱动程序. IIRC DB2/400和Sybase OLEDB驱动程序(例如)使用此方法.

There is a driver for wrapping ODBC with an OLEDB front-end if the database you are using does not come with a native OLEDB driver. IIRC DB2/400 and Sybase OLEDB drivers (for example) use this method.

Windows中的ODBC管理员仅与ODBC驱动程序有关. ODBC和OLEDB都可以使用格式略有不同的连接字符串.您可以从连接字符串中看出- www.connectionstrings.com 包含许多不同数据库驱动程序的连接字符串示例.

The ODBC administrator in Windows is only concerned with ODBC drivers. Both ODBC and OLEDB can use connection strings, which have a slightly different format. You can tell from the connection string - www.connectionstrings.com has samples of connection strings for many different database drivers.

Oracle在一周的每一天都有一种驱动程序技术.

Oracle has a driver technology for every day of the week.

  • Oracle具有原生OLEDB 驱动程序称为"Oracle提供程序 OLEDB'或其他类似产品.如果你是 使用ADO(非.Net,位于 OLEDB),这将是首选 驱动程序.

  • Oracle have a native OLEDB driver called 'Oracle provider for OLEDB' or some such. If you're using ADO (non-.Net, which sits over OLEDB) this would be the preferred driver.

它们还具有 ODBC驱动程序 这将(例如)对 从Oracle数据库中提取 MS-Access或不支持OLEDB的应用程序或系统.例如,较旧的Delphi/Oracle或Powerbuilder/Oracle应用程序可能会使用此驱动程序.

They also have an ODBC driver that would be (for example) useful for extracting from an Oracle database into MS-Access or with an application or system that does not support OLEDB. For example, older Delphi/Oracle or Powerbuilder/Oracle apps will probably use this driver.

Oracle也有一个 特定于Oracle的接口称为 OCI .这是最快的 接口,如果您使用C和 也可以在非Windows上使用 平台但与您的应用程序绑定 甲骨文.诸如 cx_Oracle 之类的动态语言绑定通常是OCI的包装.

Oracle also has an Oracle-specific interface called OCI. This is the fastest interface if you're writing in C and will also work on non-windows plaforms but ties your application to Oracle. Dynamic language bindings such as cx_Oracle for Python tend to be wrappers around OCI.

如果您使用的是.Net,则可能是 想要 ODP.Net 而不是 使用.Net为OLEDB提供.这是 标准.Net接口库 由Oracle提供.

If you're using .Net you probably want ODP.Net rather than using the .Net provide for OLEDB. This is the standard .Net interface library provided by Oracle.

有几个 JDBC驱动程序为 甲骨文.有一个2型驱动程序 这是OCI的包装, 编写的4类驱动程序 本机使用Java并进行通信 直接通过网络连接到 服务器.如果您使用的是Java,则类型4驱动程序可能是大多数应用程序的最佳选择(不必安装完整的Oracle客户端),除非您出于特殊原因需要类型2驱动程序.

There are several JDBC drivers for Oracle. There is a type-2 driver which is a wrapper for OCI and a type-4 driver which is written natively in Java and communicates directly over the network to the server. If you're using Java the type-4 driver is probably the best for most applications (you don't have to install a full Oracle client) unless you have a particular reason to need the type-2 driver.

这篇关于OLEDB v/s ODBC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆