Conclusion

With so many disparate data sources available today, the only way you can hope to manage access to that data is through some sort of homogeneous mechanism such as OLE DB. The high-level OLE DB architecture is divided into two parts: consumers and providers. Consumers use the data that is made available through providers.

As with most other COM-based architectures, OLE DB involves developers in the task of implementing a good many interfaces—a number of which are boilerplate in nature. The OLE DB Templates available through Visual C++ make creating OLE DB consumers and providers much easier.

You can create a simple consumer by pointing the ATL Object Wizard at a data source when you generate a consumer object. The ATL Object Wizard will examine the data source and create the client-side proxy to the database. From there, you can use the standard navigation functions available through the OLE DB Consumer Templates.

Writing a provider is somewhat more involved (if you want the provider to do anything useful). While the wizards give you a good start, they generate only a simple provider that enumerates the files in a directory. However, the Provider Templates contain a full complement of OLE DB support. With this support, you can create OLE DB providers that implement rowset location strategies, data reading and writing, and bookmarking.



Programming Microsoft Visual C++
Programming Microsoft Visual C++
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net