title: Replace a SqlDataAdapter for SqlCommand in my C# Code
body: <p>My code is construct to read data in a datagridView named (dg) from my database.</p>
  
  <p>Its actually work well whit a SqlDataAdapter. </p>
  
  <p>First Is it a good idea to change my SqlDataAdapter for a SqlCommand ?</p>
  
  <p>If YES</p>
  
  <p>I want to use this for change my SqlDataAdapter.</p>
  
  <pre><code>//SqlCommand cmd = new SqlCommand("Command String", con);
  //SqlDataReader readdata;
  </code></pre>
  
  <p>CODE</p>
  
  <pre><code>SqlConnection con = new SqlConnection(dc.Con);
  
  SqlDataAdapter da = new SqlDataAdapter();
  con.Open();
  da.SelectCommand = new SqlCommand("SELECT * FROM tblContacts", con);
  DataTable dt = new DataTable();
  da.Fill(dt);
  con.Close();
  
  dg.DataSource = dt;
  </code></pre>