OLE DB和ODBC数据源之间有什么区别? [英] what is the difference between OLE DB and ODBC data sources?

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

问题描述

我正在阅读有关Excel缓存的MS Excel帮助文章,想知道它们对 OLE DB和ODBC源

I was reading a MS Excel help article about pivotcache and wonder what they mean by OLE DB and ODBC sources

...您应该使用CommandText 属性而不是SQL属性, 现在主要存在于 与早期版本的兼容性 Microsoft Excel.如果同时使用 属性,CommandText属性的 值优先.

...You should use the CommandText property instead of the SQL property, which now exists primarily for compatibility with earlier versions of Microsoft Excel. If you use both properties, the CommandText property’s value takes precedence.

对于 OLE DB源,CommandType 属性描述了 CommandText属性.

For OLE DB sources, the CommandType property describes the value of the CommandText property.

对于 ODBC源,CommandText 属性功能与 SQL属性,并设置该属性 导致数据被刷新...

For ODBC sources, the CommandText property functions exactly like the SQL property, and setting the property causes the data to be refreshed...

非常感谢您的简短回答.

I really appreciate your short answers.

推荐答案

根据

According to ADO: ActiveX Data Objects, a book by Jason T. Roff, published by O'Reilly Media in 2001 (excellent diagram here), he says precisely what MOZILLA said.

(直接从该书的第7页开始)

(directly from page 7 of that book)

  • ODBC仅提供对关系数据库的访问
  • OLE DB提供以下功能
    • 访问数据,无论其格式或位置如何
    • 完全访问ODBC数据源和ODBC驱动程序
  • ODBC provides access only to relational databases
  • OLE DB provides the following features
    • Access to data regardless of its format or location
    • Full access to ODBC data sources and ODBC drivers

因此,似乎OLE DB通过ODBC驱动程序层与基于SQL的数据源进行交互.

So it would seem that OLE DB interacts with SQL-based datasources THRU the ODBC driver layer.

我不是100%肯定此图像正确.我不确定的两个连接是ADO.NET(通过ADO C-api)和OLE DB(通过ODBC到基于SQL的)数据源(因为

I'm not 100% sure this image is correct. The two connections I'm not certain about are ADO.NET thru ADO C-api, and OLE DB thru ODBC to SQL-based data source (because in this diagram the author doesn't put OLE DB's access thru ODBC, which I believe is a mistake).

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

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