Is there anything special about using IBM.Data.DB2.Core with an Azure Function? The following code works fine outside of an azure function, but throws DB2Exception
in a function.
Code:
var db2Connection = new DB2Connection(connectionString) {SystemNaming = true};
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)
at ...
It seems to be trying to read an XML configuration, possibly from the bin\Debug\netcoreapp3.1\clidriver\cfg
path (which is deployed with the function).
Also posted on the IBM forums.
User contributions licensed under CC BY-SA 3.0