title: refresh data with sqldataadapter.fill - not seeing new data
body: <p>I have a timer that runs in the background to keep data updated for a datagridview object. My timer is calling sqldatadapter.fill to fill a local scoped dataset.</p>
  
  <p>If I go over to sql server and delete a row from my table my call to fill the dataset does not reflect this change from the database.</p>
  
  <p>If I update the value of a non primary key field at the database and my timer runs the changes are picked up and shown in my datagridview.</p>
  
  <p>How do I need to set up my sqldataadapter so that it will find when rows are added or deleted by some other backend process?</p>
  
  <p>This is in form_load</p>
  
  <pre><code>If ds Is Nothing Then
          ds = New DataSet()
      End If
      Try
          sqldataadapter = New SqlClient.SqlDataAdapter(SELECTQUERY, parentconnectionstring)
          sqldataadapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
          sqlcommandbuilder = New SqlClient.SqlCommandBuilder(sqldataadapter)
          sqldataadapter.Fill(ds)
          mydata = ds.Tables(0).DefaultView
      Catch ex As Exception
          ExceptionHandler(ex)
      End Try
  
      If mydata.Table.Rows.Count &gt; 0 Then
          bindingsource.DataSource = mydata
          dgvSystemWeightConfig.DataSource = bindingsource
          UpdateLastUpdateTime()
      End If
  </code></pre>
  
  <p>And this is my refresh routine</p>
  
  <pre><code> Public Sub refreshdata()
      disableupdatetimer()
      Try
          If dgvSystemWeightConfig.IsCurrentCellInEditMode Then
              Debug.WriteLine("tried to refresh system weight data but user had a cell in edit mode")
          Else
              Debug.WriteLine("system weight - refreshing data")
  
              sqldataadapter.Fill(ds, mydata.Table.TableName)
              dgvSystemWeightConfig.Focus()
              UpdateLastUpdateTime()
          End If
      Catch ex As Exception
          ExceptionHandler(ex)
      Finally
          enableUpdateTimer()
      End Try
  End Sub
  </code></pre>