visual-studio 如何让 IBM DB2 提供程序与 Entity Framework 4.0 一起工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2722906/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get the IBM DB2 provider to work with Entity Framework 4.0
提问by camainc
Can someone please tell me how to get the DB2 provider to show up in the "Change Data Source" dialog window?
有人可以告诉我如何让 DB2 提供程序显示在“更改数据源”对话框窗口中吗?
Steps:
脚步:
- Right-click on the edmx design surface.
- Select "Update Model from Database"
- On the Update Wizard, click "New Connection"
- Next to the "Data source" textbox, click "Change..."
- 右键单击 edmx 设计图面。
- 选择“从数据库更新模型”
- 在更新向导上,单击“新建连接”
- 在“数据源”文本框旁边,单击“更改...”
In the Change Data Source window, I am only seeing the following data sources in the list:
在更改数据源窗口中,我只在列表中看到以下数据源:
Microsoft SQL Server
Microsoft SQL Server Compact 3.5
Microsoft SQL Server Database File
<other>
When I select "other", I only see two entries in the Data Provider dropdown:
当我选择“其他”时,我只在数据提供者下拉列表中看到两个条目:
.Net Framework Data Provider for Microsoft SQL Server Compact 3.5
.Net Framework Data Provider for SQL Server
How do I get the DB2 provider(s) to show up here so that I can use them to model my DB2 tables?
如何让 DB2 提供程序显示在此处,以便我可以使用它们来为我的 DB2 表建模?
I am able to successfully connect to DB2 using the VS2010 Server Explorer. The Connection string for that is:
我能够使用 VS2010 Server Explorer 成功连接到 DB2。连接字符串是:
"Provider=IBMDADB2.DB2COPY1;Data Source=DB2THLOC;Persist Security Info=True;User ID=****;Location=****" (stars for security)
The Provider is listed as:
提供者被列为:
.NET Framework Data Provider for OLE DB
Type: DB2
Version: 08.01.0005
Many Thanks In Advance
提前谢谢了
采纳答案by kdawg
What you're describing is enabled by the Visual Studio Add-In package from IBM. Currently, there is no such package for vs2010.
您所描述的内容由 IBM 的 Visual Studio Add-In 包启用。目前,vs2010 没有这样的包。
回答by 0x49D1
There already is proper providers. Drivers v9.7 FP4 or later work with VS 2010 EF 4.
已经有合适的提供者。驱动程序 v9.7 FP4 或更高版本适用于 VS 2010 EF 4。

