ASP.NET核心db2连接问题

时间:2017-09-25 12:47:36

标签: .net db2

我正在尝试在ASP.NET Core应用程序中连接VS 2017中的IBM db2服务器,但它正在抛出错误

  

无法加载DLL' db2app64.dll':找不到指定的模块。 (HRESULT异常:0x8007007E)

     

at IBM.Data.DB2.Core.UnsafeNativeMethods.DB232.SQLFreeConnAttribsADONET(DB2SQLGetConnAttribsADONETParams& pParam)
  在IBM.Data.DB2.Core.ConnSettingsFromXmlConfig.Dispose(布尔处理)
     at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection连接,String szValue,DB2ConnSettings& pSettings,DB2ConnSettingsInternal&> pSettingsInternal,Boolean bAttach,Boolean pushDownStrAppended)
  at IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(String value)
  在D:\ Sample Projects \ CodeProjects \ DB2 \ DB2 \ Controllers \ CheckController.cs中的DB2.Controllers.CheckController.Index()中:第26行   在lambda_method(Closure,Object,Object [])
  在Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()

我的连接字符串是:

var mycon = "Server=10.64.0.30;Database=Gbgeorr;User Id=FORMSCAPE;Password=******";

DB2Connection db2 = new DB2Connection(mycon);   //error throwing here 

if (db2.IsOpen == false)
  db2.Open();

0 个答案:

没有答案