OmniProv.exe - A Sample ATL OLEDB Provider for Custom Databases (254633)
The information in this article applies to:
- Microsoft OLE DB, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q254633 SUMMARY OmniProv.exe is a sample that is comprised of sample code
and an explanation of a simple ATL OLE DB provider called OmniProv.exe version
1.0. Full documentation on this provider can be found in the white paper
located here: http://msdn.microsoft.com/library/techart/omniprov.htm
Following is an excerpt from the white paper:
"The inability and inordinate struggles and frustrations of innumerable customers to create a custom provider that works with the Microsoft DataGrid Control 6.0 (OLEDB) and the Microsoft ADO Data Control 6.0 (OLEDB) on its own steam without the scores of error messages popping out has been the motivation behind writing this provider - OmniProv1.0. Its endeavor is to demonstrate not only how to interface a custom ATL OLEDB Provider with the ActiveX Controls using server-side cursors; but to also possess the capability to reliably perform inserts, updates and deletes maintaining consistency in a back-end custom database. Finally, it also offers an example for exposing data to consumers via text files that possess their own individual schematic data." Internals of OmniProv.exe OmniProv.exe version 1.0 works with the ADO DataGrid
using server-side cursors and is capable of supporting non-deferred updates,
inserts and deletes. It contains a storage class that implements the custom
database that is comprised of a Schema and a Data file. The Storage class
initially reads the schema file pointed to by the Data Source property of the
connection string. From the schema file OmniProv.exe version 1.0 discerns what
to expect from the data file. Grammar and schema of the custom database is
explained in the white paper. The white paper further explains the interfaces
required to interface with the ADO DataGrid client. Additionally, testing with
a Visual Basic ADO client and usage of IRowsetViewer with OmniProv.exe version
1.0 are explained. The white paper also enumerates the limitations of
Omniprov.exe and an explanation of error messages for this sample encountered
with the ATL OLEDB provider. REFERENCES- OLE DB 2.0 Programmer's Reference
- The following topics in the MSDN Library:
In the
Visual C++ documentation on the OLE DB Provider Templates:
- Creating an OLE DB Template Provider
- Using the OLE DB Provider Templates
- Macros for OLE DB Provider Templates
- FAQ: Using the OLE DB Provider Templates
- Enhancing the Simple Read-Only Provider
- In the OLE DB Template Samples in the Visual C++
documentation:
- PROVIDER: OLE DB Provider Templates Sample
- In the ADO Technical Articles:
- Mapping ADO Methods to OLE DB Interfaces
- In the Visual C++ Technical Articles:
- Using the Visual C++ 6.0 OLE DB Provider
Templates
NOTE: These references can be found online in the MSDN Library here: NOTE: The sample does not use the ATL _ATL_DEBUG_INTERFACES and will
not work with OLE DB Services because of a refcount problem which is exposed.
Any providers that implement separate C++ objects for each interface (as is the
case with _ATL_DEBUG_INTERFACES) may encounter an internal access violation in
OLE DB Services, which causes E_UNEXPECTED ("catastrophic failure") to be
returned from the service.
Modification Type: | Minor | Last Reviewed: | 8/9/2004 |
---|
Keywords: | kbdownload kbDatabase kbDTL kbfile kbinfo kbProvider kbSample KB254633 kbAudDeveloper |
---|
|