Search code examples
.netoracleentity-frameworkvisual-studio-2012odp.net

Latest Oracle Data Provider for .NET (11.2.0.3.20) breaks EF Update Wizard


I have VS2012 and the latest 32-bit version of ODAC (Release 5 with Oracle Developer Tools) installed on a Win7 box. Everything is a clean install. In this environment, I have an ASP.NET Web Forms solution that was originally developed in VS2010 with EDMX files that were built on 32-bit ODAC Release 4.

I am able to set up connections to the database and view tables using Server Explorer, but I am now unable to modify my EDMX files via the Update Wizard. No tables will show in the Update Wizard.

enter image description here

Here is the connection string from the first step of the VS2012 Update Wizard:

metadata=res://*/Models.EventModel.EventModel.csdl|
res://*/Models.EventModel.EventModel.ssdl|
res://*/Models.EventModel.EventModel.msl;
provider=Oracle.DataAccess.Client;
provider connection string="data source=<serverid>;
persist security info=True;
user id=<userid>"

However, on my other Win7 box, I have clean installs of VS2010, EF 4.1, and the previous 32-bit version of ODAC (Release 4) with the exact same ASP.NET solution, yet I have no problems with Update Wizard.

enter image description here

Here is the Update Wizard connection string from VS2010 and ODAC4:

metadata=res://*/Models.EventModel.EventModel.csdl|
res://*/Models.EventModel.EventModel.ssdl|
res://*/Models.EventModel.EventModel.msl;
provider=Oracle.DataAccess.Client;
provider connection string="DATA SOURCE=<serverid>;
PASSWORD=;
PERSIST SECURITY INFO=True";
USER ID=<userid>"

Other related info:

1) I am using the web.config from my VS2010/ODAC4 solution in my VS2012/ODAC5 solution.

2) I have set the VS2012 solution to target .NET 4.5.

3) I have made sure that EF5 is installed via NuGet and I have installed VS2012 Update 1.

4) I also set up a box with a clean install of VS2010 and ODAC5, and I encounter the same problem. No tables in Update Wizard.

Questions:

Are there any web.config settings or other settings that I need to change to solve this problem? If so, what are the settings?

Thanks in advance for your help. I'd really like to get going with the new ODAC and VS2012.


Solution

  • This workaround found in the Oracle forums helped me. (See the post on Dec 19 by user9948241.) Oracle has a new forums page, and the post referred to above apparently didn't make it into the new forums.

    Apparently, in VS2012 with the latest ODAC, when you set up connection filter criteria you always have to include the default schema along with whatever schema you want.

    UPDATE: Shown below is the Filters tab in the wizard for adding (or modifying) a Data Connection from the Visual Studio Server Explorer.

    Look carefully and note that in the Value field of the 'Select the filter criteria,' I have two schema values (the actual values are erased from the screenshot) separated by a comma. One is the default schema value, and the other is the schema that I want. You can set these schema values by clicking the ellipsis that I have marked in red.

    enter image description here

    For some reason, I didn't have to do all that in VS2010 with previous version of ODAC, I removed the default schema and just added the schema I wanted.