gerry99
asked on
Implementing OLE DB interfaces
I'm new to COM programming and I need to implement an OLE DB interface onto a custom data server. The actual interface is fairly simple, we would only need to support 2 types of query's, I think we can use ICommand to pass an SQL string.
My problem is how to set up the component that implements the DataSource, Session, Command and Rowset interfaces. In particular I'd like to define a component called, MyDataSource that implements the IDBInitialize, IDBCreateSession and IDBProperties interfaces. What will my IDL file look like? Can I get there using the ATL wizard in Visual C++ 5.0? Or should I read a good book on COM and OLE and implement a solution based on code samples?
Thanks,
My problem is how to set up the component that implements the DataSource, Session, Command and Rowset interfaces. In particular I'd like to define a component called, MyDataSource that implements the IDBInitialize, IDBCreateSession and IDBProperties interfaces. What will my IDL file look like? Can I get there using the ATL wizard in Visual C++ 5.0? Or should I read a good book on COM and OLE and implement a solution based on code samples?
Thanks,
Do you want to write an COM object which uses OLEDB inside or You want to merely access the OLEDB interface. In later case you don't have to know much about the COM. In that case you only need to learn how to use interfaces. But if you want to make an object which internally uses the OLE DB then you might have to know more about how to create a COM object.
ASKER
basant,
Neither, I want to write a COM object that exposes a colleciton of OLE DB interfaces so that a 3rd party client, in this case Cold Fusion, can make use of my DataSource object the same way it would use a DataSource object to one of the commerical database engines.
Neither, I want to write a COM object that exposes a colleciton of OLE DB interfaces so that a 3rd party client, in this case Cold Fusion, can make use of my DataSource object the same way it would use a DataSource object to one of the commerical database engines.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Visual C++ provides you with OLE DB Provider Templates and samples.
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/visualc/vcmfc/vcrefoledbtemplateoverview.htm
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/visualc/vcmfc/vcrefoledbtemplateoverview.htm
I'm interested in this from the CF standpoint
ASKER
thui,
Thanks for the suggestion. I am upgrading to VC++ 6.0, just to get the OLE DB application wizard. I've seen mixed reviews on the SAMs book, so I'll pass on that.
If the VC++ wizard can give me a DLL that I can just fill in the functionality for, it will have paid for itself.
BTW, "nullterminator" on thing you should know about using COM with Cold Fusion is that you cannot connect the Microsoft web server to a COM interface being running in an EXE. Hence what I'm shooting for is a OLE DB dll connecting back to my EXE based datasource through a Named pipe.
Thanks for the suggestion. I am upgrading to VC++ 6.0, just to get the OLE DB application wizard. I've seen mixed reviews on the SAMs book, so I'll pass on that.
If the VC++ wizard can give me a DLL that I can just fill in the functionality for, it will have paid for itself.
BTW, "nullterminator" on thing you should know about using COM with Cold Fusion is that you cannot connect the Microsoft web server to a COM interface being running in an EXE. Hence what I'm shooting for is a OLE DB dll connecting back to my EXE based datasource through a Named pipe.