ODBC和OleDB有什么区别? [英] What is the difference between ODBC and OleDB?

查看:310
本文介绍了ODBC和OleDB有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里找到这个问题: OLEDB v / s ODBC

I found this question here: OLEDB v/s ODBC

这给了我更多的信息,但没有真正回答我问的问题,所以我从那里开始。

Which gave me more information, but did not really answer the question I'm asking, so I shall proceed from there.

我在工作在C#中。我会给你一个关于我如何到达这个难题的长篇故事,但基本上我想在ODBC和oleDB之间做决定。

I am working in C#. I'll spare you the long story about how I arrived at this conundrum, but basically I'm trying to decide between ODBC and oleDB.

我们工作很多不同的客户端有不同的数据库(一些SQL,一些oracle,其他一些我从来没有听说过,没有打扰记住的名称)

We work with a lot of different clients who have vastly varied Databases (some SQL, some oracle, some something else that I've never heard of and didn't bother to remember the name of)

现在,从我的了解,ODBC是旧的,是/是标准。现在OleDB已经来了,...是...不同?但实现相同的事情(它谈到数据库)

Now, from what I understand, ODBC is old, and was/is the standard. And now OleDB has come along and... is... different? but accomplishes the same thing (it talks to databases)

为什么要使用一个呢? ODBC是(根据上面的帖子)跨平台,这是好的,但他提供很少的信息,OleDB提供哪些ODBC不。

Why would I want to use one over the other? ODBC is (according to the above post) cross-platform, which is good, but he offers very little information as to what OleDB offers that ODBC does not.

在我的其他研究,我发现(在MSDN论坛上)人们说使用OleDB,如果你可以,如果你必须,诉诸ODBC自然,三个没有推理这个,所以我想听一些。 / p>

In my other research, I've found (on the MSDN forums) People saying "use OleDB if you can, if you have to, resort to ODBC" Naturally, three's no reasoning given for this, so I'd like to hear some.

推荐答案

ODBC是用于访问数据库的C API。有一个标准,它由每个主要数据库供应商支持,它有非常好的文档,它是跨平台的。 OLEDB是一个类似的接口,使用Microsoft的COM技术而不是C API。这意味着它只能在支持COM的平台上轻松使用。

ODBC is a C API for accessing databases. There is a standard for it, it is supported by every major database vendor, it is very well documented, it is cross-platform. OLEDB is a similar interface that uses Microsoft's COM technology instead of the C API. This means that it is only easily useable on platforms that support COM.

在一天结束时,两个库提供大致相同的基本功能。实际上,有些OLEDB驱动程序实际上使用ODBC而不是本机数据库库。

At the end of the day, both libraries provide roughly equivalent basic functionality. Indeed, Some OLEDB drivers actually make use of ODBC rather than native database libraries.

因此,如果你是C#开发人员,在Windows上工作,OLEDB是二。如果你使用C(或C ++不使用COM),或需要跨平台的支持,那么ODBC是更好的赌注。

So, if you are C# developer, working on Windows, OLEDB is the obvious choice between the two. If you are using C (or C++ not using COM), or need cross-platform support, then ODBC is the better bet.

这篇关于ODBC和OleDB有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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