title: DataAdapter does not need to make db connection open?
body: <p>I try to use DataAdapter in C#.net. and still I do not understand something about DataAdapter.</p>
  
  <p>I read many article and blogs about DataAdapter and DataReader.</p>
  
  <p>I understood DataAdapter will open and close database automatically when they need.</p>
  
  <p>But,</p>
  
  <pre><code>//conn.Open();
  AdsDataAdapter da;
  da = new AdsDataAdapter("Select * from Test", conn);
  AdsCommandBuilder cb;
  cb = new AdsCommandBuilder(da);
  
  DataSet ds = new DataSet();
  da.Fill(ds, "Test");
  
  DataRow newrow = ds.Tables["Test"].NewRow();
  newrow["Name"] = "How about";
  ds.Tables["Test"].Rows.Add(newrow);
  da.Update(ds, "Test");
  </code></pre>
  
  <p>When I run the code above, I get an error message that say "Connection must be open."</p>
  
  <p>Why the adapter can not open connection automatically?</p>
  
  <p>and, I want to insert data using insertCommand (For this test, I opened the connection).</p>
  
  <pre><code>da.InsertCommand = new AdsCommand("INSERT INTO test (NAME) values('Insert Test #1')", conn);
  //da.InsertCommand.ExecuteNonQuery(); // it works
  da.Update(ds,"Test"); //but it does not works.
  </code></pre>
  
  <p>Many example using Adapter.Update(), but for me, it does not work :(</p>
  
  <p>No error and nothing inserted.</p>
  
  <p>and using da.InsertCommand.ExecuteNonQuery(); instead Update(), it works.</p>
  
  <p>what am I doing wrong?</p>
  
  <p>Thanks!</p>