Hello everyone,
I'm using IBM.Data.DB2.Core 3.1.0.400 in a netcoreapp3.1 project. I'm running into an issue where I cannot call a program that I can confirm works on another solution running a connection to the same server through ODBC. I've reviewed the documentation below and I cannot figure out what the problem may be. I would appreciate any thoughts anyone may have!Calling stored procedures from .NET applications The way I am setting up the call & parameters:
using (var cmd = _connection.CreateCommand())
{
cmd.CommandType = CommandType.Text;
cmd.CommandText = "CALL WEB070RCL(?,?,?,?,?,?)";
cmd.Parameters.Add(new DB2Parameter("ENTY", DB2Type.Char) {Value = "B", Direction = ParameterDirection.InputOutput});
cmd.Parameters.Add(new DB2Parameter("ANUM", DB2Type.Char) {Value = "66599971", Direction = ParameterDirection.InputOutput });
cmd.Parameters.Add(new DB2Parameter("ISeriesUserId", DB2Type.Char) {Value = "9876543210", Direction = ParameterDirection.InputOutput });
cmd.Parameters.Add(new DB2Parameter("PRTNCD", DB2Type.Char) {Value = "", Direction = ParameterDirection.InputOutput });
cmd.Parameters.Add(new DB2Parameter("PEMSG", DB2Type.Char) {Value = "", Direction = ParameterDirection.InputOutput });
cmd.Parameters.Add(new DB2Parameter("FNAME", DB2Type.Char) {Value = "", Direction = ParameterDirection.InputOutput });
cmd.ExecuteNonQuery();
}
The exception message I am receiving:
ERROR [42815] [IBM][AS] SQL0451N The "1" definition, in the statement that defines routine "*N ", contains a data type "*N.WEB070RCL" that is not appropriate for a non-sourced routine written in the given language or a routine that is defined as autonomous.
Due to this program/procedure working in another solution that uses ODBC, I can't quite make sense of this exception message.
I would appreciate any thoughts! Thank you@
------------------------------
Jon McKinley
------------------------------
#DataManagementGlobal#DataServerDrivers