title: Can't run stored proc from ODBC with multiple output parameters
body: <p>I'm having trouble executing a stored procedure in ODBC to a DB2 database where a stored procedure has multiple input and output params. If I specify only in input params in the call statement with ? like below, i get "<strong>SQL0440 - Routine XXXXXXX in *N not found with specified parameters</strong>.". I've changed the output params to be of type '<strong><em>ReturnValue</em></strong>' or '<strong><em>Output</em></strong>' with the same result.</p>
  
  <p>Here is my code: </p>
  
  <pre><code>var paramList = new List&lt;OdbcParameter&gt;();
  
         var param1 = new OdbcParameter("FldId", "SLPMEMST_MESLRY");
         param1.OdbcType = OdbcType.Char;
         param1.Direction = ParameterDirection.Input;
         paramList.Add(param1);
  
         var param2 = new OdbcParameter("ExtIndex",2346);
         param2.OdbcType = OdbcType.Decimal;
         param2.Direction = ParameterDirection.Input;
         paramList.Add(param2);
  
         var param3 = new OdbcParameter("LogCmt", "test here");
         param3.Direction = ParameterDirection.Input;
         param3.OdbcType = OdbcType.Char;
         paramList.Add(param3);
  
  
          var prmOut1 = new OdbcParameter("PlainText", OdbcType.Char, 32624);
          prmOut1.Direction = ParameterDirection.InputOutput ;
  
          var prmOut2 = new OdbcParameter("MsgId", OdbcType.Char, 7);
          prmOut2.Direction = ParameterDirection.InputOutput;
  
          var prmOut3 = new OdbcParameter("MsgText", OdbcType.Char, 80);
          prmOut3.Direction = ParameterDirection.InputOutput;
  
          var prmOut4 = new OdbcParameter("Errors", OdbcType.Char, 1);
          prmOut4.Direction = ParameterDirection.InputOutput;
  
          paramList.Add(prmOut1);
          paramList.Add(prmOut2);
          paramList.Add(prmOut3);
          paramList.Add(prmOut4);
  
          var sproc = "{? =call P_GetEncFld (?, ?, ?)}";
  DAL.Common_AS400.RunNonQuery_Parameterized(sproc, paramList,CommonData.ConnectionStringCrypto);
  
  
   public static void RunNonQuery_Parameterized(string SQLStatement, IEnumerable&lt;OdbcParameter&gt; parameters, string connectionString)
          {
              OdbcConnection oConn = new OdbcConnection(ConfigurationManager.ConnectionStrings[connectionString].ToString()) { ConnectionTimeout = 300 };
              using (var oCmd = new OdbcCommand())
                  {
                      foreach (OdbcParameter param in parameters)
                      {
                          oCmd.Parameters.Add(param);
                      }
  
                      if (oConn.State != ConnectionState.Open) oConn.Open();
                      oCmd.CommandType = CommandType.Text;
                      oCmd.CommandText = SQLStatement;
                      oCmd.Connection = oConn;
                      oCmd.ExecuteNonQuery();
                  }
          }
  </code></pre>
  
  <p>Ideas?</p>