比较 ODBC、ADO、OLE DB 和 DAO,各自的特点是:
- ODBC: 基于C的接口,效率最高。
- OLEDB:基于ODBC,编程复杂。
- DAO: 基于ODBC,不支持多线程。
- ADO: 基于OLE DB,效率最低,编程最容易。
一般我选用 ODBC,因为有个 mODBC控件 with full Delphi Source.
也很想选用 ADO, 因为可能是个趋势。但是尚未找到好的控件。
以下文字摘自<a href=http://www.15seconds.com/Issue/961210.htm>参考文献</a>
Why use ODBC 3.0?
ODBC 3.0 supports Connection Caching, is thread safe, and is a low level API.
Why not use ADO?
ADO is easier to write then either OLEDB or ODBC, but ADO adds an
extra layer that slows down the connection.
Why not use DAO?
DAO is the worst of the bunch, not only is it not thread safe, it
does not support connection caching and is several layers above ODBC.
Why Not Use OLEDB?
There are three major reasons that we are not using OLEDB for this example.
OLEDB does not support connection caching.
OLEDB is slower then ODBC.
OLEDB requires more code.