title: Reassigning a datasource at run-time
body: <p>I did some searching and only found more unanswered questions. :)</p>
  
  <p>Using D5pro.</p>
  
  <p>I want to reassign the DataSource to a TDBGrid at run time. I have seven identical structured DataSets and depending on a button click I want the appropriate DataSet displayed in the grid.</p>
  
  <p>I have tried everything and I cannot get it to show the next DataSet. It sticks with the first one assigned at start up. I am getting to overkill approaches and still nothing is working. Here's where I am at the moment.</p>
  
  <pre><code>procedure SetSource(var aSrc : TDataSource);
  begin
    aSrc.DataSet.Close;
    dbgridShowData.DataSource:=aSrc;
    aSrc.DataSet.Open;
    aSrc.DataSet.First;
    aSrc.DataSet.Refresh;
  end;
  </code></pre>
  
  <p>Where am I going wrong?</p>
  
  <p>Thanks</p>