[英]The underlying provider failed on ConnectionString
I am getting the following error trying to connect to DB2 Entity with .Net 4.0 我在尝试使用.Net 4.0连接到DB2实体时遇到以下错误
The underlying provider failed on ConnectionString. 基础提供程序在ConnectionString上失败。
I get it on this line within the generated code of my entity cs file 我在我的实体CS文件的生成代码中的这一行上得到了它
public DOCUMAKRContainer() : base("name=DOCUMAKRContainer", "DOCUMAKRContainer")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
My App.config (which is created when you create entity the looks like this 我的App.config(在创建实体时创建的外观如下:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections />
<connectionStrings>
<add name="DOCUMAKRContainer"
connectionString="metadata=res://*/Documakr.csdl|res://*/Documakr.ssdl|res://*/Documakr.msl;provider=IBM.Data.DB2;provider connection string="Database=DCCPDEVL;User ID=documakr;Password=Dcpd@123;server.com:60000"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
I have tried to delete and rebuild the entity and get the same results every time. 我试图删除并重建实体,每次都得到相同的结果。 All of this is generated code when you add an entity object, so I am wondering if it is a VS 2010/IBM DB2 issue.
添加实体对象时,所有这些都是生成的代码,所以我想知道这是否是VS 2010 / IBM DB2问题。 Internet has not really given me any help.
互联网并没有真正给我任何帮助。
Thoughts? 有什么想法吗?
This site is a good resource: http://www.connectionstrings.com/ 该站点是一个很好的资源: http : //www.connectionstrings.com/
It looks you have have some garbage in your connection string: 看起来您的连接字符串中有一些垃圾:
provider connection string="Database
Actually, it looks like you've got a conection string jammed into your connection string. 实际上,您的连接字符串中似乎塞有一个连接字符串。
Also, you might want to edit your post and remove or ##### the login info. 另外,您可能需要编辑您的信息并删除或#####登录信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.