• <bdo id='RHLLo'></bdo><ul id='RHLLo'></ul>
      <i id='RHLLo'><tr id='RHLLo'><dt id='RHLLo'><q id='RHLLo'><span id='RHLLo'><b id='RHLLo'><form id='RHLLo'><ins id='RHLLo'></ins><ul id='RHLLo'></ul><sub id='RHLLo'></sub></form><legend id='RHLLo'></legend><bdo id='RHLLo'><pre id='RHLLo'><center id='RHLLo'></center></pre></bdo></b><th id='RHLLo'></th></span></q></dt></tr></i><div id='RHLLo'><tfoot id='RHLLo'></tfoot><dl id='RHLLo'><fieldset id='RHLLo'></fieldset></dl></div>

    1. <small id='RHLLo'></small><noframes id='RHLLo'>

      <tfoot id='RHLLo'></tfoot><legend id='RHLLo'><style id='RHLLo'><dir id='RHLLo'><q id='RHLLo'></q></dir></style></legend>

      无法连接到 DB2:Azure 函数上的 IBM.Data.DB2.Core 版本 3.1.0.400

      时间:2023-09-17

      <tfoot id='eHL28'></tfoot>

      • <bdo id='eHL28'></bdo><ul id='eHL28'></ul>
      • <i id='eHL28'><tr id='eHL28'><dt id='eHL28'><q id='eHL28'><span id='eHL28'><b id='eHL28'><form id='eHL28'><ins id='eHL28'></ins><ul id='eHL28'></ul><sub id='eHL28'></sub></form><legend id='eHL28'></legend><bdo id='eHL28'><pre id='eHL28'><center id='eHL28'></center></pre></bdo></b><th id='eHL28'></th></span></q></dt></tr></i><div id='eHL28'><tfoot id='eHL28'></tfoot><dl id='eHL28'><fieldset id='eHL28'></fieldset></dl></div>

            <legend id='eHL28'><style id='eHL28'><dir id='eHL28'><q id='eHL28'></q></dir></style></legend>
            • <small id='eHL28'></small><noframes id='eHL28'>

                <tbody id='eHL28'></tbody>
                本文介绍了无法连接到 DB2:Azure 函数上的 IBM.Data.DB2.Core 版本 3.1.0.400的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 nuget 包 IBM.Data.DB2.Core 版本 3.1.0.400 从带有 Azure Functions 版本 v3 (Windows) 的 Azure 函数连接到 IBM DB2 数据库.应用程序构建成功.

                在本地执行它时,我面临以下异常.

                IBM.Data.DB2.Core.DB2Exception (0x80004005): ERROR [] [IBM][CLI Driver] SQL10007N 消息0"无法检索.原因代码:6".在 IBM.Data.DB2.Core.ConnSettingsFromXmlConfig.ProcessFromXmlConfig(DB2Connection 连接、字符串 dbname、字符串主机、字符串端口、字符串 tmpClientEncAlg、字符串 tmpAuthentication、字符串 prevdb、字符串 prevdb_ori、DB2ConnSettings& sSettings、DB2ConnSettingsInternal& sSettingsInternal、StringBuilder& modifiedValue)在 IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection 连接,字符串 szValue,DB2ConnSettings 和 pSettings,DB2ConnSettingsInternal 和 pSettingsInternal,布尔 bAttach,布尔 pushDownStrAppended)在 IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(字符串值)在 IBM.Data.DB2.Core.DB2Connection..ctor(字符串 connectionString)

                这是代码片段,在实例化 DB2Connection 时,我遇到了异常.

                使用 (var db2Connection = new DB2Connection(_configuration["DB2_ConnectionString"])){db2Connection.SystemNaming = true;

                请注意.此代码在我能够连接到 DB2 的控制台应用程序中运行良好.

                谢谢大家.

                解决方案

                Azure 函数支持目前在 Db2 .NET 中不可用提供者.它将在即将发布的 .NET 5 和.NET Core 3.1.

                看https://community.ibm.com/community/user/hybriddatamanagement/communities/community-home/digestviewer/viewthread?GroupId=6163&MessageKey=2494b111-ffe7-4073-a8ec-e7e1c485e6d0&CommunityKey=f2e5dc34-896d-4e8e-9678-724907c4b9f5&tab=digestviewer&ReturnUrl=%2fcommunity%2fuser%2fhybriddatamanagement%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3df2e5dc34-896d-4e8e-9678-724907c4b9f5%26>

                I'm using nuget package IBM.Data.DB2.Core version 3.1.0.400 to connect to IBM DB2 database from Azure functions with Azure Functions Version v3 (Windows). Application builds successfully.

                While executing it locally itself, I am facing following exception.

                IBM.Data.DB2.Core.DB2Exception (0x80004005): ERROR [] [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved.  Reason code: "6".
                
                   at IBM.Data.DB2.Core.ConnSettingsFromXmlConfig.ProcessFromXmlConfig(DB2Connection connection, String dbname, String host, String port, String tmpClientEncAlg, String tmpAuthentication, String prevdb, String prevdb_ori, DB2ConnSettings& sSettings, DB2ConnSettingsInternal& sSettingsInternal, StringBuilder& modifiedValue)
                   at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection connection, String szValue, DB2ConnSettings& pSettings, DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean pushDownStrAppended)
                   at IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(String value)
                   at IBM.Data.DB2.Core.DB2Connection..ctor(String connectionString)
                

                Here's the code snippet, where at the time of instantiating the DB2Connection I am getting above exception.

                using (var db2Connection = new DB2Connection(_configuration["DB2_ConnectionString"]))
                {
                     db2Connection.SystemNaming = true;
                

                Please note. This code works well as console application where I am able to connect to DB2.

                Thank you all.

                解决方案

                the Azure functions support is currently not available in Db2 .NET provider. It will be available in the upcoming release of .NET 5 and .NET Core 3.1.

                See https://community.ibm.com/community/user/hybriddatamanagement/communities/community-home/digestviewer/viewthread?GroupId=6163&MessageKey=2494b111-ffe7-4073-a8ec-e7e1c485e6d0&CommunityKey=f2e5dc34-896d-4e8e-9678-724907c4b9f5&tab=digestviewer&ReturnUrl=%2fcommunity%2fuser%2fhybriddatamanagement%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3df2e5dc34-896d-4e8e-9678-724907c4b9f5%26tab%3ddigestviewer

                这篇关于无法连接到 DB2:Azure 函数上的 IBM.Data.DB2.Core 版本 3.1.0.400的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:SQL1159 DB2 .NET 数据提供程序的初始化错误,原因代码 10,令牌 0.0.0、9.7.3 下一篇:SQL0666 - SQL 查询超出指定的时间限制或存储限制

                相关文章

              • <tfoot id='WHMoH'></tfoot>

                <small id='WHMoH'></small><noframes id='WHMoH'>

                  <i id='WHMoH'><tr id='WHMoH'><dt id='WHMoH'><q id='WHMoH'><span id='WHMoH'><b id='WHMoH'><form id='WHMoH'><ins id='WHMoH'></ins><ul id='WHMoH'></ul><sub id='WHMoH'></sub></form><legend id='WHMoH'></legend><bdo id='WHMoH'><pre id='WHMoH'><center id='WHMoH'></center></pre></bdo></b><th id='WHMoH'></th></span></q></dt></tr></i><div id='WHMoH'><tfoot id='WHMoH'></tfoot><dl id='WHMoH'><fieldset id='WHMoH'></fieldset></dl></div>

                    <bdo id='WHMoH'></bdo><ul id='WHMoH'></ul>
                    <legend id='WHMoH'><style id='WHMoH'><dir id='WHMoH'><q id='WHMoH'></q></dir></style></legend>