title: How to create a dataset in c# programmatically?
body: <p>I was hoping there is a way to dynamically create a dataset in Visual Studio (I'm using c#)
  I know you can just create one the &quot;click and drag&quot; way, but was hoping there is a way to create one dynamically because I need to put data in a report that has been gathered from any database and any table and any column .</p>
  <p>(I have a program that can connect to any mysql or sql database, and display any table and any column.)</p>
  <p>Now I need to put that in a report.
  But first a dataset.</p>
  <pre><code>DataTable table1 = new DataTable(&quot;patients&quot;);
  table1.Columns.Add(&quot;name&quot;);
  table1.Columns.Add(&quot;id&quot;);
  table1.Rows.Add(&quot;sam&quot;, 1);
  table1.Rows.Add(&quot;mark&quot;, 2);
  
  DataTable table2 = new DataTable(&quot;medications&quot;);
  table2.Columns.Add(&quot;id&quot;);
  table2.Columns.Add(&quot;medication&quot;);
  table2.Rows.Add(1, &quot;atenolol&quot;);
  table2.Rows.Add(2, &quot;amoxicillin&quot;);
  
  // Create a DataSet and put both tables in it.
  DataSet set = new DataSet(&quot;office&quot;);
  set.Tables.Add(table1);
  set.Tables.Add(table2);
  
  
  // TODO: This line of code loads data into the 'SwimkidzDataSet.Branches' table. 
  // You can move, or remove it, as needed.
  this.BranchesTableAdapter.Fill(this.manuallyCreatedDataset.Branches);
  </code></pre>
  <p>Tried this but no chance it will work</p>
  <pre><code>this.BranchesTableAdapter.Fill(set);
  this.reportViewer1.RefreshReport();
  </code></pre>