How to get the IBM DB2 provider to work with Entity Framework 4.0

醉酒当歌 提交于 2019-12-01 06:06:20

问题


Can someone please tell me how to get the DB2 provider to show up in the "Change Data Source" dialog window?

Steps:

  1. Right-click on the edmx design surface.
  2. Select "Update Model from Database"
  3. On the Update Wizard, click "New Connection"
  4. Next to the "Data source" textbox, click "Change..."

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?

I am able to successfully connect to DB2 using the VS2010 Server Explorer. The Connection string for that is:

"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


回答1:


What you're describing is enabled by the Visual Studio Add-In package from IBM. Currently, there is no such package for vs2010.




回答2:


There already is proper providers. Drivers v9.7 FP4 or later work with VS 2010 EF 4.



来源:https://stackoverflow.com/questions/2722906/how-to-get-the-ibm-db2-provider-to-work-with-entity-framework-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!