title: SQL SERVER ODBC ERROR(Invalid object name) but when I add in SQL query mydb.dbo.mytable all works fine
body: <p>I have an old asp.net 1 project (it works fine on old server, mytable exist in db. Now I am trying to upgrade it to asp.net 4</p>
  
  <p>My connection string is:</p>
  
  <pre><code>&lt;add key="SqlConnection" 
       value="DRIVER={SQL Server};SERVER=bel\SQLEXPRESS;Trusted_connection=yes;DAT­ABASE=mydb;option=3;"/&gt;
  </code></pre>
  
  <p>I get error </p>
  
  <blockquote>
    <p>ERROR [42S02] [Microsoft][ODBC SQL Server Driver][SQL
    Server]Invalid object name 'mytable'.</p>
    
    <p>OdbcCommand dataCommand = new OdbcCommand("select * from mytable",
    dataConnection);<br>
    dataCommand.CommandTimeout = 900;<br>
    OdbcDataReader dataReader =
    dataCommand.ExecuteReader(CommandBehavior.CloseConnection);  </p>
  </blockquote>
  
  <p>When I wrote SQL as <code>select * from mydb.dbo.mytable</code> all works fine</p>
  
  <p>What I should change in db settings (security, schema, dbo) or in connection string?</p>