title: updating a database using a table adapter and data table
body: <p>I am currently working on a VB program connected to an Access database.  I have fill a data table using a query and data adapter.  At a later stage in the program, i want to go through and make permanent changes to the database using the adapter and table.  I tried this: </p>
  
  <pre><code>For Each row As DataRow In db.DBDT.Rows
  
              row("fldsentda") = "Y"
              row("flddasenddate") = Date.Today
          Next row
  
  
          'db.DBDT.AcceptChanges()
          db.DBDA.Update(db.DBDT)
  </code></pre>
  
  <p>*db is a class file, dbda is the data adapter, and dbdt is the data table</p>
  
  <p>but i realized these changed are only effected the data table and not the actual database.  How can I get it to where it will effect only the database rows that are inside of the data table filled using the query?</p>
  
  <p>Update: I'm thinking my update function isn't written. I don't know if this should be a separate question or not, but how do I write the update function to only change fields in the database that has been changed on the data table?? </p>