locked
DDEX provider for custom ADO.NET data provider RRS feed

  • Question

  • I have written a custom ADO.Net provider for a custom database based on the System.Data.Common base classes. This is all OK and working well. I am now trying to integrate it into Server Explorer by developing a simple DDEX provider based on the basic sample in the VSIP SDK.

     

    Server Explorer is happy with my registry settings and display my provider for selection OK. I select it and get the prompt for a connection string but I can't figure out how it needs to locate my provider. I get the message "Unable to find the requested .Net Framework Data Provider. It may not be installed".

     

    Can someone please point me in the right direction as to how my data provider needs to be installed to be known by VS etc?

     

    Many thanks

    Friday, May 18, 2007 11:15 AM

Answers

  • ADO.NET 2.0 allows you to enumerate installed data providers. See:

     

    http://msdn2.microsoft.com/en-us/library/12kxkt25(VS.80).aspx

     

    This is done through the machine.config:

     

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config

     

    So, I think that you have to add your custom ADO.NET provider to that file,   <system.data><DbProviderFactories> section.

    Friday, May 18, 2007 11:55 AM
  • I have not tested it, but yes, I suppose that it must be GAC'ed
    Friday, May 18, 2007 6:31 PM

All replies

  • ADO.NET 2.0 allows you to enumerate installed data providers. See:

     

    http://msdn2.microsoft.com/en-us/library/12kxkt25(VS.80).aspx

     

    This is done through the machine.config:

     

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config

     

    So, I think that you have to add your custom ADO.NET provider to that file,   <system.data><DbProviderFactories> section.

    Friday, May 18, 2007 11:55 AM
  • OK with that and thanjs for the response... but how does that end up yielding the location of the DLL as there does not seem to be any field in that section that specifies the path to the DLL? Or should that just be in the GAC?
    Friday, May 18, 2007 5:17 PM
  • I have not tested it, but yes, I suppose that it must be GAC'ed
    Friday, May 18, 2007 6:31 PM
  • Dave -- head over to http://sqlite.phxsoftware.com and download the source code for my SQLite ADO.NET 2.0 Provider.

     

    You'll find heaps of source for building and integrating your data provider into the server explorer.  All the source for a DDEX provider is there, along with an install program which you could adapt to install your provider into the GAC and register it so the Server Explorer can see it.

     

    Robert

     

    Saturday, May 26, 2007 5:55 AM