我有一个旧应用程序,经过很长时间尝试测试它。我得到以下异常:
Unable to find the requested .Net Framework Data Provider. It may not be installed.
我的代码:
public DBConnection(string ConnectionString)
{
this.providerFactory = DbProviderFactories.GetFactory("IBM.Data.Informix");//Exception here
this.connection = new IfxConnection();
if (string.IsNullOrEmpty(ConnectionString))
{
this.connection.ConnectionString = ConfigurationManager.ConnectionStrings["r_informix"].ToString();
}
else
{
this.connection.ConnectionString = ConfigurationManager.ConnectionStrings["r_informix"].ToString();
}
command = this.connection.CreateCommand();
}
我尝试在这里执行以下解决方案
</runtime>
<system.data>
<DbProviderFactories>
<add name="IBM.Data.Informix"
invariant="IBM.Data.Informix.Client"
description="Informix Data Provider for .NET"
type="IBM.Data.Informix,
IBM.Data.Informix,
Version=3.0.0.2,
Culture=Neutral,
PublicKeyToken=7c307b91aa13d208" />
</DbProviderFactories>
</system.data>
but In vain ...