title: Error encountered: Value does not fall within the expected range
body: <p>I'm accessing oracle database which I'm a beginner on my api C#, when I try to execute my code, I'm encountering this error message according my exception handler &quot;Value does not fall within the expected range&quot;. Would appreciate any inputs/corrections.</p>
  <p>Oracle Code:</p>
  <pre><code>   create or replace PACKAGE BODY PKGFAETEST AS
     PROCEDURE CheckUser(uNAME IN VARCHAR2,
                   pWORD IN VARCHAR2,
                   po_refcsr OUT cursor_type)
     AS                 
     BEGIN 
     OPEN po_refcsr FOR
      SELECT
       A1.ID,
       A1.USERNAME,
       A1.PASS,
       A1.FIRSTNAME,
       A1.LASTNAME
      FROM
       FAE_TEST_USERS A1
      WHERE
       A1.USERNAME = uNAME
       AND A1.PASS = pWORD;
      END;
    END PKGFAETEST;
  </code></pre>
  <p>C# Code:</p>
  <pre><code>   public bool checkUser(string uName, string pWord)
      {
          bool result = false;
          try
          {
              string dbUName = string.Empty;
              string dbPWord = string.Empty;
              
              using (OracleConnection conn = new OracleConnection(TNS))
              {
                  OracleCommand objCmd = new OracleCommand();
                  objCmd.Connection = conn;
                  objCmd.CommandText = &quot;PKGFAETEST.CheckUser&quot;;
                  objCmd.CommandType = CommandType.StoredProcedure;
                  objCmd.Parameters.Add(&quot;uNAME&quot;, SqlDbType.VarChar).Value = uName;
                  objCmd.Parameters.Add(&quot;pWORD&quot;, SqlDbType.VarChar).Value = pWord;
                  conn.Open();
                  using (OracleDataReader reader = objCmd.ExecuteReader())
                  {
                      while (reader.Read())
                      {
                              if (reader[&quot;USERNAME&quot;] != DBNull.Value)
                              {
                                  dbUName = Convert.ToString(reader[&quot;USERNAME&quot;]);
                              }
                              if (reader[&quot;PASS&quot;] != DBNull.Value)
                              {
                                  dbPWord = Convert.ToString(reader[&quot;PASS&quot;]);
                              }
                              result = true;
                      }
  
                  }
  
                  conn.Close();
                  conn.Dispose();
              }
          }
          catch (Exception e)
          {
              Console.WriteLine(&quot;Exception caught: {0}&quot;, e);
          }
          return result;
  
      }
  </code></pre>