IBM.Data.DB2.Core 1.0.0.100 throws System.EntryPoi

2019-08-21 18:15发布

问题:

When trying to query a table I'm receiving the below.

at IBM.Data.DB2.Core.UnsafeNativeMethods.DB2InteropAPP.sqlocpcv(Byte** ppucInput, UInt32 uInputLen, UInt32 uSourceCP, UInt32 uTargetCP, UInt32 uConvMethod, Sqlocvcbx* pConvCB, UInt32* pfSubstitue) at IBM.Data.DB2.Core.UnsafeNativeMethods.DB2Sys.sqlocpcv(Byte** ppucInput, UInt32 uInputLen, UInt32 uSourceCP, UInt32 uTargetCP, UInt32 uConvMethod, Sqlocvcbx* pConvCB, UInt32* pfSubstitue) at IBM.Data.DB2.Core.DB2ConvUtil.ConvertCp(Byte* pSource, Byte* pTarget, Int32 iSourceBytes, Int32 iTargetSize, Int32* piSourceBytesProcessed, Int32* piTargetBytesReturned, UInt32 uiSourceCodePage, UInt32 uiTargetCodePage, Sqlocvcbx* pConvCB) at IBM.Data.DB2.Core.DB2DataDescriptor.GetStringAndAdvance(Byte*& pDataBuffer) at IBM.Data.DB2.Core.DB2DataDescriptor.ReadDDExtDataArea(Byte* pDataBuffer, DDEntry ddEntry) at IBM.Data.DB2.Core.DB2DataDescriptor.FillDDInfo(IntPtr pSqldd) at IBM.Data.DB2.Core.DB2DataDescriptor..ctor(IntPtr pSqldd, DB2Connection Connection) at IBM.Data.DB2.Core.DB2DataReader.SetDataDescriptors(IntPtr pOutputDD, IntPtr pColInfoDD) at IBM.Data.DB2.Core.DB2DataReader.SetDataDescriptors(CLI_SQLDD_KIND flags) at IBM.Data.DB2.Core.DB2Command.ExecuteReaderObject(CommandBehavior behavior, String method, DB2CursorType reqCursorType, Boolean abortOnOptValueChg, Boolean skipDeleted, Boolean isResultSet, Int32 maxRows, Boolean skipInitialValidation) at IBM.Data.DB2.Core.DB2Command.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)

System.EntryPointNotFoundException: Unable to find an entry point named 'sqlocpcv' in DLL 'db2app64.dll'.

My project configuration is set to x64.

<PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <Platforms>x64</Platforms>
    <TargetPlatform>x64</TargetPlatform>
  </PropertyGroup>