Article ID: 254633 - Last Review: August 9, 2004 - Revision: 2.4 OmniProv.exe - A Sample ATL OLEDB Provider for Custom DatabasesThis 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. 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. MORE INFORMATIONThe
following files are available for download from the Microsoft Download
Center: OmniProv.exe (http://download.microsoft.com/download/ole/10/1/win98/en-us/omniprov.exe) For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
REFERENCES
http://msdn.microsoft.com
(http://msdn.microsoft.com)
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. | Article Translations
|
Back to the top
