ADO.NET Provider not registered

ADO.NET Provider not registered

Postby felipecorrea » Thu 02 Jul 2009 13:19

Hello all.

Deploying an application using a Setup Project, it didn't registered CoreLab's dll. Using the method
Code: Select all
System.Data.Common.DbProviderFactories.GetFactoryClasses(),
does not return it.
Any idea?


Thanks in advance.


I'm using [i]OraDirect_oranet470pro2.[/i]
felipecorrea
 
Posts: 2
Joined: Thu 02 Jul 2009 13:07

Postby Shalex » Fri 03 Jul 2009 09:42

Your environment should be informed about the existence of the provider factory to make the above method to work. The provider factory is described either in machine.config (globally) or in app.config (just for your application), but not in both files. Assuming that you use OraDirect .NET, this is done as follows:
Code: Select all

 
            type="CoreLab.Oracle.OracleProviderFactory, CoreLab.Oracle, Version=4.70.38.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
 


Replace 4.70.38.0 here with your actual version. You can find your current version in the Tools | Oracle | About menu of Visual Studio.
Shalex
Devart Team
 
Posts: 7709
Joined: Thu 14 Aug 2008 12:44

Postby felipecorrea » Wed 09 Sep 2009 14:28

Great it works!
But...
I use this component within an application that has a setup.
How am I suppose to add this on installation process?
felipecorrea
 
Posts: 2
Joined: Thu 02 Jul 2009 13:07

Postby Shalex » Wed 09 Sep 2009 15:32

If your application is the *.exe file, please put this entry to the *.exe.config file, and place this file in the directory where *.exe resides. If your application is class library, put the mentioned entry to global (machine.config) file. If your application is a web site (web application), put this entry to its web.config file.
Shalex
Devart Team
 
Posts: 7709
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle