create a data provider

K

Klemens

I would like to create my own data provider in .NET which is able to
deliver data to all apps supporting oledb or odbc. Information about
this is very rare in the Web. Are there any code samples around or
books from which I could learn how to do this? Important, again, is
the part which makes the provider visible to Excel etc.
- Klemens
 
W

William \(Bill\) Vaughn

ODBC Data Providers are not that hard to write for a skilled developer but I
expect the documentation is too old to be committed to the web. Kyle
Geiger's book might give you that insight.
http://www.amazon.com/Inside-Odbc-Microsoft-programming-Geiger/dp/1556158157.
OLE DB Data Providers can be quite difficult to write. The spec is about 10"
thick. I would not recommend anyone off campus to attempt this without a lot
of help--which as you discovered can be hard to find.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 
K

Klemens

I hoped it would become a lot easier with .NET. At least implementing
pure .NET data providers is not a big deal. However, I don't know
which shell to put round this to make it accessible to OLEDB or ODBC
consumers liek Excel. Shouldn't there be a generic way? As this is not
my core business I would need to dry my plans.
Thanks anyway.
- Klemens
 
R

Robert Simpson

The only way for you to write a ODBC or OLEDB wrapper is in C++. You can of
course compile with the /CLR option and include an ADO.NET provider, but all
3 technologies are vastly different and completely independent of one
another.

There are ADO.NET wrappers for ODBC and OLEDB providers, but not the other
way around. It would actually be an interesting project to write a generic
ODBC or OLEDB wrapper for an ADO.NET data provider.

Robert Simpson
Programmer at Large
http://sqlite.phxsoftware.com


I hoped it would become a lot easier with .NET. At least implementing
pure .NET data providers is not a big deal. However, I don't know
which shell to put round this to make it accessible to OLEDB or ODBC
consumers liek Excel. Shouldn't there be a generic way? As this is not
my core business I would need to dry my plans.
Thanks anyway.
- Klemens
 
K

Klemens

Time teaches:
You can write a OLE DB Simple Provider in VB6 by implementing the
OLEDBSimpleProvider interface. It is easy. Google for "AxData". This
sample was once delivered with VS6. Shouldn't be too difficult to do
the same with VB.NET. However, the bad news is that this provider is
_too_ simple for consumers like Excel 2007. You can use it perfectly
in VS projects by putting a data control in between. But Excel can't
do this and therefore you don't have a chance to pass the DataMember
in.
- Klemens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top