基础提供失败的ConnectionString的 [英] The underlying provider failed on ConnectionString
问题描述
我收到以下错误试图连接到DB2实体与.net 4.0
I am getting the following error trying to connect to DB2 Entity with .Net 4.0
基础提供上失败的ConnectionString。
The underlying provider failed on ConnectionString.
我得到它在我的实体CS文件的生成code
I get it on this line within the generated code of my entity cs file
public DOCUMAKRContainer() : base("name=DOCUMAKRContainer", "DOCUMAKRContainer")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
我的App.config(当你创建的实体是创建看起来像这样
My App.config (which is created when you create entity the looks like this
<?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>
我试图删除和重建实体,每次都得到相同的结果。所有这一切都产生code,当你添加一个实体对象,所以我想知道,如果它是一个VS 2010 / IBM DB2的问题。互联网还没有真正给我任何帮助。
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. Internet has not really given me any help.
思考?
推荐答案
这个网站是一个很好的资源:的http:// www.connectionstrings.com/
This site is a good resource: 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.
这篇关于基础提供失败的ConnectionString的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!