OleDB Managed Provider written in C #

The OleDB provider is a binary implementing COM interface provided by Microsoft. From this, it seems you can create a provider using C #. It's right? Is there a sample demonstrating this? If not, would you dissuade me from this? I see that there are several unmanaged samples, but I can not find managed ones.

+4
source share
3 answers

It’s on my head ... but here is an interesting article by Dino Esposito on this issue at a high level:

http://msdn.microsoft.com/en-us/library/ms810268.aspx

+2
source

The article is good, but does not really answer the question. OLEDB is a set of COM interfaces that can actually be implemented in .NET through COM Interop, although I have never heard of such an implementation and are probably not recommended.

The OLEDB interface suite is documented by Microsoft here . OLEDB is a complex topic, and not all interfaces are necessary to implement a functional provider. To make matters worse, different OLEDB clients have a set of interfaces that they need to be able to use a provider. For example, here is a list of required interfaces that must be implemented to use the provider from the .Net OLEDB client (System.Data.OleDb. *). Note. I did not find such a link for 2.0 Framework or later. Finally, it is worth noting that it was difficult to implement the vendors that Microsoft later provided the ATL Template Set (C ++) to help developers do it right.

To learn more about OLEDB, I definitely recommend looking at the Windows Data Access SDK on MSDN.

+2
source

I'm not sure that I really understand your question ?! Already there is a managed OleDBProvider ?!

using System.Data.OleDb; 

Of course, I would discourage writing a provider that exists and works absolutely fine! :)

But in response to your first question, you can of course create your own. A data provider roadmap can be a good place to start a review and sample links, etc.

-4
source

Source: https://habr.com/ru/post/1276622/


All Articles