Trying to use the Oracle Data Provider for .NET (ODP.NET)
with Entity Framework (EF) results in the following error:
System.Data.ProviderIncompatibleException: The store provider factory type
'Oracle.DataAccess.Client.OracleClientFactory' does not implement the
IServiceProvider interface. Use a store provider that implements this
interface.
Possible Root Causes:
1. If ODP.Net Entity Framework is used, make sure that the dll 'Oracle.DataAccess.dll' in Visual Studio Solution explorer is pointing to version '2.112.3.0'. The reason is that the ODP.Net Entity Framework is supported only with version '112.3.0' or later.
To know which version dll is loaded in Visual Studio, we can use a free tool called Process Explorer, this will help to analyze the dlls loaded on Visual Studio exe (Devenv.exe).
2. ODP.Net Entitiy framework support .Net 4.0 (or later) versions. I have created ODP.Net entities in Visual Studio 2010 and changed the framework to 3.5 (for SharePoint development reasons) that gave me the same error as above one when i ran the application, but when I change the framework to 4.0, it works fine.
Most of the blogs (I personally found in google search) doesn't speak clearly about this. So please make sure that you are using ODP.Net Entity Frameworkwith only 4.0 or later version of .Net framework. However, please note that the ODP.Net (without entity framework) supports the earlier .Net versions such as .Net 3.5 (this is what we tried).
Sometimes, you may also see errors like "Could not load assembly Oracle.DataAccess.dll", this may be the issue with bit versions. Oracle provides this dll in two versions, they are: 32 bit and 64 bit. In visual studio you make sure that you are using 32 bit dll since Visual Studio 2010 is 32 bit. While deploying the ShareObjects (like webparts), make sure that you are using 64 bit Oracle.DataAccess.dll since SharePoint 2010 supports only 64 bit dlls
"Great blog created by you. I read your blog, its best and useful information. You have done a great work. Super blogging and keep it up.php jobs in hyderabad.
ReplyDelete"