最新的Oracle数据提供.NET(11.2.0.3.20)打破EF更新向导向导、数据、最新、EF

2023-09-03 01:18:49 作者:零摄氏度少女

我有VS2012和最新的32位版本的ODAC (第5版和Oracle开发工具)安装在Win7的盒子。一切都是干净的安装。在这种环境下,我最初开发VS2010与建在32位ODAC版本4.

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.

我能够建立连接使用服务器资源管理器,数据库和查看表,但我现在无法通过更新向导修改我的EDMX文件。没有表将显示在更新向导。

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.

下面是从VS2012更新向导的第一步,连接字符串:

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>"

不过,在我的其他的Win7中,我有VS2010,EF 4.1的全新安装,和previous 32位版本的ODAC(第4版)与完全相同的ASP.NET解决方案,但我没有问题的更新向导。

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.

下面是VS2010和ODAC4更新向导连接字符串:

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)我使用的web.config从我在我的VS2012 / ODAC5解决方案VS2010 / ODAC4解决方案。

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

2)我已经设置了VS2012解决方案,面向.NET 4.5。

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

3)我已经确定了EF5通过的NuGet安装,我已经安装了VS2012更新1。

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

4)我还设置了一个干净的盒子安装VS2010和ODAC5,我遇到了同样的问题。没有表中的更新向导。

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.

问题:

是否有任何web.config设置或我需要改变来解决这个问题,其他的设置?如果是这样,有什么设置?

在此先感谢您的帮助。我真的想获得新的ODAC和VS2012去。

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

推荐答案

的此解决办法的发现,在Oracle论坛上帮助了我。 (见由年12月19后的 user9948241 。) Oracle有一个新的论坛页面,上面提到的后显然没有使之成为新的论坛。

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.

显然,在VS2012与最新ODAC,当你建立连接的过滤条件,你总是必须包括与任何你想要的模式默认模式。

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.

更新:下面显示的是在向导中的过滤器选项卡添加(或修改)从Visual Studio服务器资源管理器数据连接。

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.

由于某些原因,我没得做所有在VS2010与ODAC的previous版本,我删除了默认模式和刚刚添加我想要的模式。

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.