
 | |
OleDBPro vs ATL Consumer Templates
- OleDBPro provides a complete solution but ATL consumer templates don't.
OleDBPro can easily deal with any valid
statement as long as a provider is able to do so. OleDBPro wraps all of
defined OLEDB objects. However, ATL consumer templates only supports
OLEDB specification version 1.1. ATL consumer templates don't wrap TView,
TBinder, TRow, TStream and TDataset objects as well as chaptered rowset.
You can easily take advantage of
MS provided services (client cursor engine, data shape, and others) with
OleDBPro. With ATL consumer templates, you have to write your own code for
these services.
-
OleDBPro is faster than ATL consumer
templates.
Without use of OleDBPro specific
functionality, CRBase in OleDBPro is always faster than CBulkRowset with a
dynamic accessor in ATL consumer templates. CRBase can be configured to be
as fast as CBukRowset with a user well-defined accessor at run time.
If using OleDBPro unique
features, for example, Just-In-Need fetching, OleDBPro is definitely faster
than ATL consumer templates.
By default, OleDBPro uses the
batch mode to retrieve data from and send data into a data source silently
for fast data movement over network, but ATL consumer templates don't. This
feature makes OleDBPro run at the super speed.
-
OleDBPro is much simpler than ATL consumer
templates.
It can be complicate and
difficult to use ATL consumer templates, depending on involved statements
and rowsets because you have to deal with DBBINDING structures and one of
accessors, CAccessor<T>, CDynamicAccessor,
CDynamicParameterAccessor and CManualAccessor derived from CAccessorBase. Contrarily, if you use OleDBPro module, you will never cope with these
DBBINDING and accessors directly. OleDBPro manages them for you inside on
the fly. This OleDBPro feature reduces lots of pitfalls and tricks of OLEDB
programming. Further, OleDBPro provides better ways to manage binary large
objects (BLOBs) and data types conversion. With ATL consumer templates, you
will certainly meet problems of BLOBs and complex data types such as
VARNUMERIC, NUMERIC, CY, VARIANT, and DBTYPE_IUNKNOWN etc.
OleDBPro already implements all tough
OLEDB interfaces like IRowsetIndex, IViewFilter and IRowsetFind. You have to deal with them if you use ATL consumer templates.
-
OleDBPro is better in many other aspects than
ATL consumer templates.
OleDBPro has various ways
including both all the common ones and the OleDBPro-specific ones to improve
data accessing performance.
Since all the OleDBPro classes
and templates are 100% dynamic, you can easily extend them and will never
define a static user record accessor at development time. If you use ATL
consumer templates, you will have to do so for many of your statements and
procedures. This OleDBPro feature leads to more concise codes and lighter
software components. Additionally, OleDBPro can use its own templates to further
light components.
|