How do I use an ADO.NET managed provider in Excel?

1.5k views Asked by At

I have an ADO.NET Managed Data Provider that is registered in machine.config in DbProviderFactory - It is available for use from, say, Analysis Services, so I know it is correctly registered.

However, I need to be able to query the managed provider from Excel, but the managed provider doesn't appear as a choice from Data Link Properties | All Ole Db Providers.

How do I get an ADO.NET Managed Data Provider to appear there, or is there another technique I need to use?

Thanks in advance, Eli.

3

There are 3 answers

0
Eli On BEST ANSWER

Turns out there is no way to directly use an ADO.NET provider in Excel.

Had to write an OLE DB provider (in ATL C++ no less) to bridge the two - that was fun...

1
Eli On

I have a potential workaround.

I am going to create a CLR stored procedure that will in turn perform a passed SQL query using the managed provider.

I can then invoke the stored procedure using SQLServer OLE DB or ODBC providers.

It should work, if Murphy stays away.

0
Ognyan Dimitrov On

It is a late post, but now there is an ADO.NET way to this - http://support.microsoft.com/kb/316934#12