title: Oracle.DataAccess.Client.OracleException: ORA-00936: missing expression
body: <p>I wrote a C# console program to try to query some data from Oracle, it is a very simple query but I don't know why it is always tell me "missing expression" while running it, see below my code    </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Oracle.DataAccess.Client;
  using System.Configuration;
  
  namespace ConnectToOracle
  {
      class Program
      {
          static void Main(string[] args)
          {
  
              string strCon = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
  
              using (OracleConnection oc = new OracleConnection(strCon))
              {
                  OracleCommand cmd = new OracleCommand("select dname from dept where deptno = @deptno", oc);
                  OracleParameter op = new OracleParameter();
                  op.ParameterName = "@deptno";
                  op.OracleDbType = OracleDbType.Int32;
                  op.Direction = System.Data.ParameterDirection.Input;
  
                  cmd.Parameters.Add(op);
                  oc.Open();
                  string dname = (string)cmd.ExecuteScalar();
             }
          }
      }
  }
  </code></pre>
  
  <p>so, at the last line, the error "missing expression" will be thrown from cmd.ExecuteScalar() method, can any one tell me why? I was confused    </p>
  
  <p>thanks in advance!</p>