title: Interrupting DataAdapters?
body: <p>I have a circumstance where I'm popping up a dialog window containing a "Please Wait" message, running an SQL query, then replacing the "Please Wait" message with a DataGridView containing the collected results.</p>
  
  <p>The code I'm using for this is basically:</p>
  
  <pre><code>    Dim X As New Data.SqlClient.SqlCommand
      X.CommandText = "SELECT some_data FROM someTable"
      Dim XAdapter As New System.Data.SqlClient.SqlDataAdapter(X)
      Dim XSet As New DataSet
      XAdapter.Fill(XSet, "MyTable")
  
      Me.someDataGridView.DataSource = XSet.Tables("MyTable").DefaultView
  </code></pre>
  
  <p>I would like to put the retrieval of this data into a background thread, so that the UI doesn't freeze up while I'm loading larger datasets, but, having done this, I'd also like to allow the user to cancel and close the dialog, if accessing the data takes longer than they want to wait.</p>
  
  <p>At the moment, this Dialog window can take some arbitrary SQL string and display the results (using SQLDataAdapter) without any extra code.</p>
  
  <p>How can I make this process interruptible, while also retaining the ease of access of the SQLDataAdapter?</p>