Link to home
Start Free TrialLog in
Avatar of gerry99
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,
Avatar of basant
basant

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.
Avatar of gerry99

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.
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm interested in this from the CF standpoint
Avatar of gerry99

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.