title: SQL exception unhandled , invalid object name
body: <p>I am trying to get a query to execute on button click in visual studio 2010. As soon I reach the ExecuteReader statement, it says </p>
  
  <blockquote>
    <p>"Invalid object name 'task'."</p>
  </blockquote>
  
  <p>The table name is task and the field name is task as well. The SQL connection runs fine. What could be the problem ?</p>
  
  <pre><code>        string MyConString = "Data Source=.\\SQLExpress;Initial Catalog=filter;Integrated Security=SSPI;";
          SqlConnection connection = new SqlConnection(MyConString);
  
          string mycmd;
          connection.Open();
          SqlCommand cmd;
          //mycmd = "select task from task where task='" + textBox3.Text + "'";
          mycmd = "SELECT task.id FROM task WHERE task.task='plan1'";
          cmd = new SqlCommand(mycmd, connection);
          SqlDataReader sdr;
          string val = "";
          //try
          //{
          //cmd.ExecuteNonQuery();
          sdr = cmd.ExecuteReader();
  </code></pre>