title: Asp.Net C# database connection not working
body: <p>I have this connection string in my <code>web.config</code>: </p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="SQLServerConnectionString"
           connectionString= "..."
           providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>And this simple C# code to pull from the db:</p>
  
  <pre><code>dbAD.SelectCommand = new OleDbCommand("SELECT * FROM Profile ORDER BY FullName ASC", dbConnect);
  dbAD.Fill(dbRS, "Profile");
  
  if (dbRS.Tables("Profile").Rows.Count &gt; 0)
  {
      foreach (DataRow employee in dbRS.Tables("Profile").Rows)
      {
          Response.Write("Employee: " + Profile("FullName") + " " + Profile("Academy") + "&lt;p&gt;");
      }
  }
  </code></pre>
  
  <p>However, I get an error: </p>
  
  <blockquote>
    <p>The name 'dbAD' does not exist in the current context</p>
  </blockquote>
  
  <p>I take it I need to define <code>dbAD</code>, or a few other variables before hand, but I'd only be guessing.</p>
  
  <p>Thanks in advance! </p>