0201657929,OLE DB Consumer Templates: A Programmer's Guide,OLE,DB,Consumer,Templates:,A,Programmer's,Guide,buy,book,books,purchase,read,Pierre Nallet
Books
Books
Sign In | View Cart Cart | Wish List | Help
ToysHealthPersonalAdultBaby
ToysHealthPersonalAdultBaby
Home & Garden
Checkout Now »
Cart Cart Cart
0 Items
Cart
100% Safe and Private!
Search     for:    

Books
Browse All Topics    New Releases    Coming Soon

All Topics > Computers & Internet > Programming > APIs & Operating Environments > OLE
 
Browse similar subjects

Shipping

All orders
shipped by
airmail!

Click here for our
Shipping Policies!

 


Quotations

"There used to be certain words you couldn't say in front of a girl. Now, you can say them, but you can't say 'girl.'"

  Tom Lehrer

 

 

OLE DB Consumer Templates:
A Programmer's Guide

 
  by Pierre Nallet
 
 
 Take A Trip Around The Word
Take A Trip Around The Word
Product
Take A Trip Around The Word
Take A Trip Around The Word
Take A Trip Around The Word
  
  
  
Take A Trip Around The Word
Take A Trip Around The Word 


ZIN Product Number: 10642067

 
eBay (last 12 months)
Auctions: 22
Price Range: $0.09 - 0.09
 
Craigslist (last 12 months)
Classifieds: 19
Price Range: $0.07 - 0.02
 
Amazon Used (last 12 months)
Auctions: 95
Price Range: $0.09 - 0.09
 
ZooScape (last 12 months)
Auctions: 0
Price Range: N/A
 
 
Google listings (non-affiliate) 121
MSN listings (non-affiliate) 23
Yahoo listings (non-affiliate) 83
 


 FastFind Line
Inverse Black Hole
By the Numbers
By the Numbers
Cover To Cover
Cover to Cover
Reader's Corner
Reader's Corner
Behind the Pen
Behind the Pen
Table of Contents
Table of Contents
Related Reading
Related Reading
Inverse Black Hole
FastFind Line
 
 
By The Numbers
 Product Details

  Format: Paperback, 448 pages
  Publisher: Addison-Wesley
  ISBN: 0201657929
  Release Date: Jan 10, 2000


 
 
Cover to Cover
 From The Publisher
—Bob Beauchemin, Senior Staff Instructor, DevelopMentor

The cornerstone of Microsoft's universal data access strategy, OLE DB is a component database architecture that provides universal data integration over an enterprise-wide network. Although powerful, the technology often requires complex programming to accomplish even simple tasks. The OLE DB consumer templates address this important concern. Together, they compose a high-level and high-performance C++ library on top of OLE DB, which greatly facilitates database application development.

A comprehensive and practical guide, OLE DB Consumer Templates is an essential resource for all database programmers working with Microsoft technologies. The book is filled with examples that show you how to harness the power of OLE DB using consumer templates to create efficient, scalable, and manageable database applications.

OLE DB Consumer Templates presents an overview of DNA, COM, universal data access, and how OLE DB fits in with Microsoft's component and data access strategies—it explains the differences between OLE DB and ADO architectures. The author provides detailed and practical information on using OLE DB consumer templates to develop all the major elements and functions of database applications, including:

  • OLE DB wizard
  • OLE DB errors
  • OLE DB properties
  • Data sources and sessions
  • Tables, commands, rowsets, and accessors
  • Exchanging data
  • BLOBs
  • Transactions
  • Schema information

In addition to the OLE DB consumer templates, this book also features theauthor's library of template extensions that provide further options to enhance the capabilities of OLE DB. Appendices discuss advanced C++ techniques, and provide a reference to OLE DB types and conversions.

 

 
 Foreword

OLE DB, OLE DB consumer templates? Why should you care? At first, when a new technology emerges, the first reaction is confusion: Why do we need something new? What does it do? How does it work? Is it worth my time?

OLE DB is one of many data access technologies. The field of data access technology is very crowded, one example being Microsoft's ODBC. Usually when there are many competing technologies, it is a sign of tradeoffs. One technology might be easy to use but slow; another might be fast but not portable; another might be portable but difficult to use; and so forth. OLE DB does better than any of the other technologies in many areas: It is based on COM, it is very modular and efficient, it covers many aspects of data access, and it is supported by many data vendors. In fact, this explains why Microsoft uses OLE DB inside its SQL Server and for distributed queries. However, OLE DB has one drawback: complexity. Writing a simple program or component with OLE DB is similar to writing a graphical user interface (GUI) application using the Windows API: It takes lots of (not so simple) code to perform a simple task.

This is where the OLE DB consumer templates come in: They are a high-level, high-performance C++ library on top of OLE DB. In short, the OLE DB consumer templates are to database programming what ATL is to GUI programming. One of the greatbenefits of this approach is that you can choose the level you are working at. You can use the template library and stay at a high level of abstraction, but you also have access to all the lower-level details.

There are two ways to look at what OLE DB can offer:

  • If you are a database programmer, you probably know first-hand the drawbacks of letting people access the database directly. You need some kind of intermediate protective layer. A set of COM components is a good choice for accomplishing this, and the OLE DB consumer templates are a good tool for gluing the components and the database together.
  • If you are a C++ developer, you might need persistence support. Databases are one of many choices. One of the traditional drawbacks of storing data in a database is that the database is complicated for the programmer to manage. The OLE DB consumer templates, however, provide a straightforward approach for C++ programmers.

At first, I was happy being a simple OLE DB consumer templates programmer. As time passed, however, I realized that there was no in-depth documentation of this library and no book devoted to it. I had to explore this library by myself.

Furthermore, I realized that the OLE DB consumer templates did not cover all facets of OLE DB, so I started writing small extensions that would cover additional aspects of OLE DB or offer different options. I grouped them together in one library that I called the OLE DB extensions. When I thought about releasing the code, it became obvious that the OLE DB extensions were bigger than the OLE DB consumer templates and hence needed some documentation. As a result, I decided to write this book to explain both the OLE DB consumer templates and the OLE DB extensions.

When starting with OLE DB, you have two options: One, you can start at the lower level with Microsoft's OLE DB SDK and then go up a more abstract level. Two, you can start at the C++ level with the OLE DB consumer templates and go down to the SDK level when needed.

This book presents OLE DB programming using the templates, not the SDK. Microsoft provides detailed documentation of OLE DB, so there is no point in replicating that effort here. However, this book is designed to be more or less self-contained. If there is a concept of the SDK that needs to be understood, I'll spend some time on it. In other words, you won't have to turn to the SDK documentation too frequently. This does not mean that you should not refer to the OLE DB SDK; the SDK remains the best the reference to use.

Dealing with OLE DB is a little bit like using COM. At first, you wonder why you need to deal with this complex technology. But once you have used it for some time, you will wonder how you could have programmed without it. In between, several events need to occur. First, you should understand, through experience, the motives behind the technology; when you understand why something exists, it is easier to understand how it works. Second, you need to think that it is easy—easy to understand and easy to use.

The OLE DB consumer templates will facilitate this transition because you can use them progressively. Performing simple tasks is straightforward. Then you can increasingly explore the numerous options that the library offers. In other words, your understanding of the OLE DB consumer templates can grow with your needs.

The goal of this book is to take you along this learning path and to help you develop efficient, scalable, manageable database applications.

The Future of OLE DB

OLE DB is an evolving technology. While this book is based on version 2.5, it is likely that a new version will be released before or right after this book appears on the shelves. Actually, OLE DB 2.6 is already available with SQL Server beta 2. OLE DB 2.6 introduces streams as a result of commands, which is useful for returning an XML stream instead of a rowset. The OLE DB for Data Mining specification is also close to the final stage of development.

What is next? OLE DB will continue to follow the needs of the marketplace. Look for complex row support, more XML support, and more command languages.

Logistics

What do you need to be able to run the OLE DB consumer templates on your computer? First, you need a C++ compiler—Visual C++ 6.0 or later. Visual C++ comes with the OLE DB consumer templates files and a default OLE DB setup.

It also would be a good idea to download the latest platform SDK from http://msdn.microsoft.com/. Finally, the OLE DB extension files and the examples discussed in this book are available at http://www.com-object.com/oledbtemplates. Note that some examples require the Windows Template Library (WTL), which is part of the SDK platform.





 
 
The Reader's Corner
  Product Review
 
 Be the first to rate this book!     Number of Reviews: 0
 
 
 
Behind the Pen
 Accreditation

Pierre Nallet is an acknowledged expert on OLE DB and other Microsoft software development technologies. He is a freelance consultant at COM-Object.com, a consulting corporation providing support for implementing DNA solutions.





 
 
Table of Contents
 (NOTE: Each chapter concludes with a Summary.)
Preface.
Acknowledgments.
1. Windows DNA and COM.
Distributed Internet Applications.
The Windows DNA Architecture.
The Presentation Tier.
The Business Logic Tier.
The Data Tier.
DNA Summary.

DNA Scenarios.
The Client-Server Architecture.
The Web.

Component Object Model.
Reuse.
Challenges.
The COM Solution.
COM+ and Attributes.
The Benefits of COM.
COM Aggregation.

Using COM Objects with ATL.
COM Component Encapsulation.

2. Universal Data Access.
Universal Data Server.
Universal Data Access in Detail.
UDA Components.
Open DataBase Connectivity.
OLE DB.
ODBC versus OLE DB.
OLE DB Versions.
ActiveX Data Object.

OLE DB Templates.
Using Raw OLE DB.
Using the OLE DB Consumer Templates.
The OLE DB Template Extensions.


3. The OLE DB Wizard.
Is the Wizard a Good Thing?
Using the Wizard.
Creating an ATL Project.
Invoking the Wizard.

Generated Code.
Opening a Table.
Opening a Command.
Adding Support for Changes.
Using Stored Procedures.
Improvements to the Generated Code.

The MFC Wizard.
OLE DB Consumer Template Classes Overview.
Table Command Rowset Accessor Architecture.
Putting Classes Together.

CassessorRowset.
Closing CaccessorRowset.


4. Errors and Error Mechanisms.
HRESULT.
Interpreting HRESULT.
HRESULT in Practice.

Error Info and Error Records.
Tracing Errors.
IerrorInfo.
IerrorRecords.
Using the OLE DB Classes.
Getting the Basic Error Information.
Getting a Custom Error Object.
ErrorInfo Support.
Putting Things Together.


5. OLE DB Properties.
The Notion of Property.
Properties and Property Sets.
Property Set GUIDs.
Property Groups.
Property Operations.

Setting Properties.
DBPROPSET.
DBPROP.
Using the Raw Structures.
CDBPropSet.
Setting One Property.
Required and Optional Properties.
Column Identifiers.
Custom Property Classes.
Checking the Property Status.

Getting Properties.
DBPROPIDSET.
CDBPropIDSet.
Memory Management.
Getting One Property.

Enumerating Properties.
Enumerating Errors.

Getting Property Information.
DBPROPINFOSET.
DBPROPINFO.
CDBPropertyInfoSet.

Summary.

6. Data Sources and Sessions.
Some History.
Proprietary Database.
ODBC.

Opening a Data Source Programmatically.
ProgID and CLSID.
Opening a Data Source with User Name and Password.
Opening a Data Source from a Set of Properties.
Opening a Data Source with Incomplete Information.
Security.

Data Links and Initialization Strings.
Storing the Connection String.

Opening a Data Source Interactively.
The Data Link Properties Dialog.
The Organize Data Links Dialog.

Service Components and Resource Pooling.
Resource Pooling.
Closing a Data Source.

Enumerators.
The Root Enumerator.
Enumerator Navigation.
Data Sources and Enumerators.
Provider Enumerators.

Data Source Extensions.
Saving the Connection String to a File.
Editing a Data Source.
Getting the CLSID.

Sessions.
Summary.

7. Tables and Commands.
Table or Command?
Tables.
Opening a Table.

Commands.
Ccommand.
Opening a Command.
Closing a Command.
Preparing a Command.
Commands with Parameters.
Commands with Multiple Results.

Command Extensions.
Commands with Multiple Parameter Accessors.
Commandswith Multiple Parameter Sets.

Summary.

8. Rowsets.
Rowset Objects.
Rowset Classes.
Rowsets and Rows.
Row Management.
Row Count and Position.
Cursor Movement.
Row Identity.

Bookmarks.
Bookmark Types.
Bookmark Position.
Standard Bookmarks.

Rowset Properties.
Setting Properties at Creation Time.
Getting Properties.

Bulk Rowsets.
Rowset Arrays.
Client Cursor Service Component.
Finding Rows.
A Find Example.
Using the Find.

Summary.

9. Accessors.
Overview.
Column and Parameter Accessors.
Input and Output Accessors.
Bindings.
Accessors as Collections of Bindings.

Accessor Classes.
CaccessorBase.
Distinguishing the Accessor Classes.
CnoAccessor.

Using Caccessor.
Column Binding Macros.
Length and Status Binding Macros.
Precision and Scale Macros.
Column Type and Size Macros.
Auto Accessors.
Multiple Accessors.
Binding by Reference.
Provider-Owned Memory.
Client-Owned Memory.
BSTR.
Binding Method Summary.
Parameter Binding.

Dynamic Accessors.
Using Dynamic Accessors.
Getting and Setting Data Parts.
Using CdynamicParameterAccessor.
Extending Dynamic Accessors.

Summary.

10. Exchanging Data.
Getting Data.
Auto Accessors.
GetDataHere.

From the Consumer to the Data Store.
Deleting a Row.
Setting Data.
Inserting a Row.
Rowset Method versus SQL.

Deferred Updates.
Setting Deferred Changes.
Using Deferred Updates.
Pending Status.
Pending Rows: Navigating the Cache.
Transmitting the Changes.
Updating All Changes.
Undoing Changes.
Undoing All Changes.
Original and Last Visible Data.
Deferred Changes and Transactions.

Notifications.
Rowset Listeners.
Event Reasons.
Event Phase.
Notification Example.

Summary.

11. BLOBs.
BLOB Types.
Content.
Access Method.
Long and Short BLOBs.
Fixed-Size and Variable-Size BLOBs.

BLOBs as In-Memory Data.
BLOBs as In-Memory Data by Reference.
BLOB as Storage Object.
Storage Interfaces.
Retrieving BLOB Data with a Storage Object.
Storing BLOB Data with a Storage Object.
Storing BLOBs by Writing on a Storage Object.
Storing BLOBs with a Consumer-Provided Storage Object.
BLOB Properties.
Handling Several BLOBs.
Converting Interfaces, Memory, and Files.

Accessing Persistent COM Objects.
Summary.

12. Transactions.
The Need for Transactions.
The Transaction Approach.
Transaction Properties.
Atomicity.
Consistency.
Isolation.
Durability.

Using Transactions.
Simple Transaction.
Transaction Retention.
Rowset Preservation.
Preservation Demo.

Isolation Levels.
Transaction Isolation Demo.
Read Uncommitted Transactions.
Read Committed Transactions.
Repeatable Read Transactions.
Serializable Transactions.
Isolation Levels and Locks.
Sessions with No Transactions.

Asynchronous Transactions.
Using Transaction Outcome.
Getting Events from the Transaction.

Nested Transactions.
Using Nested Transactions.

Distributed Transactions.
Microsoft Distributed Transaction Coordinator.
Using MS DTC.

Transactions and Components.
Component Granularity.
Microsoft Transaction Server and COM+ Components.
Transaction Enlistment.


13. Indexes, Chapters, and Views.
Indexes.
Index Type.
Using Indexes.
Opening an Index.
Seeking a Row.
Restricting the Index Range.

Chapters.
Using a Chapter.
CrowsetEx.

Hierarchical Rowsets.
Example.
Traditional Approach.
Chapter Approach.
Data Shaping Service.
Navigating Hierarchical Rowsets.

Views.
When to Use Views.
Opening a View.
View Type.
Sorting a View.
Filtering a View.
View Chapters.
Stacking Views.


14. Schema, Definitions, and Synchronization.
Querying and Navigating the Schema.
Restrictions.

The Catalog/Schema Model.
Catalogs.
Tables.
Columns.
Views.
Procedures.
Indexes.
Keys.
Privileges.
Provider Types.

Modifying the Schema.
Using CTableDefinition.
Using CIndexDefinition.

Synchronizing the Schema.
Checking Binding at Compile Time.
Binding by Name.
Creating Tables from the Code.


15. OLAP.
From Tabular to Multidimensional Data.
Multidimensional Sessions and Commadns.
Datasets.
The Dataset Object.
Cdataset.
Working with Datasets.

Metadata: Axis Information.
Axis Navigation.
Axis with Multiple Dimensions.
Axis Information with Multiple Dimensions.
Using CAxisAccessor with Multiple Dimensions.

Cells.
Cell Identification.
Cell Accessors.
Getting Cell Data.
Cell Ranges.

Using Multidimensional Data with Rowsets.
OLAP Schema.

16. Hierarchical Data.
Object Overview.
Direct Binding.
Working with Direct Binding.

The Row Object.
Opening a Row.
Creating a Row.
Getting and Setting Column Values.
Scoped Operations.

Document Model.
Row Folder Object.
Opening and Creating a Row Folder.
Enumerating Children.

Streams.
Opening a Stream.
Reading and Writing in a Stream.

Epilogue.

Appendix A: Advanced C++ Techniques.
Inheriting from a Template Parameter.
Default Template Parameters.
Type Definition Overloading.

Appendix B: OLE DB Types and Conversions.
Conversion Table.

Index.


 
 
Related Reading
 Find similiar books in these subject areas:

All Topics > Computers & Internet > Programming > APIs & Operating Environments > OLE
All Topics > Computers & Internet > Programming > Languages & Tools > C & C++ > General
All Topics > Computers & Internet > Programming > Software Design > Object-Oriented Design
All Topics > Computers & Internet > Databases > General
All Topics > Computers & Internet > General
All Topics > Design & Development > Object-Oriented Design


 
 
 People like you also bought:

Learn OLE DB Development with Visual C++ 6.0, by Nathan Wallace

The C++ Standard Library: A Tutorial and Reference, by Nicolai M. Josuttis

Professional SQL Server 2000 Programming, by Robert Vieira

JDBC API Tutorial and Reference, Second Edition: Universal Data Access for the Java 2 Platform Second Edition, by Seth White

Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery, by Gottfried Vossen

Applied Microsoft .NET Framework Programming , by Jeffrey  Richter

Programming Windows with C# (Core Reference)  , by Charles Petzold

Developer's Workshop to COM and Atl 3.0, by Andrew W. Troelsen

Developing Applications with Visual Studio. NET, by Richard Grimes

Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library, by Scott Meyers

 
 
 Keywords
Database management, Database management, OLE (Computer file), Object-Oriented Programming, Database Engineering, Computer Bks - Data Base Management, Computers, Database Management - General, Programming Languages - C++, Programming - Object Oriented Programming, Database management, OLE (Computer file), Object-Oriented Programming, Database Engineering, Computer Bks - Data Base Management, Computers, Database Management - General, Programming Languages - C++, Programming - Object Oriented Programming, Database management, OLE (Computer file), Object-Oriented Programming, Database Engineering, Computer Bks - Data Base Management, Computers, Database Management - General, Programming Languages - C++, Programming - Object Oriented Programming

 
 
 FastFind Line
Inverse Black Hole
By the Numbers
By the Numbers
Cover To Cover
Cover to Cover
Reader's Corner
Reader's Corner
Behind the Pen
Behind the Pen
Table of Contents
Table of Contents
Related Reading
Related Reading
Inverse Black Hole
FastFind Line
 
 


Make $1 per sale -
Link to ZooScape.com!


About Us   |   Our Policies   |   Your Cart   |   Contact Us   |   Help
ZooScape.com

Copyright 1995 - 2008 - ZooScape.com
 
ZooScape.com