What is the difference between ODBC and OleDB?

后端 未结 3 1090
遇见更好的自我
遇见更好的自我 2021-02-15 12:31

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.

I a

3条回答
  •  星月不相逢
    2021-02-15 12:52

    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.

    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.

    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.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题