title: accessing a dataset and table adapter from a new class
body: <p>I created a working Windows Forms project in C# that accesses an Access database of recipes. Using table adapters and the dataset I am able to query, update and insert new data into the database. </p>
  
  <p>I created a new VS project, imported my database and started a new class. My problem is when I try to set up the table adapters I get errors, specifically with the <code>.Fill()</code> method. When I check the datasource.xsd I can see that the <code>.get()</code> and <code>.Fill()</code> methods were created but I can't seem to access them like I did when I just dragged and dropped the binding source onto the WinForm previously. </p>
  
  <p>I copied the code to programmatically create the table adapters from the MSDN website but I get the error on the line where I call <code>ingredientTableAdapter.Fill(recipiesNewDataSet);</code> method. Any one have a clue why? Here's my code on this project so far:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace MyRecipeDataBase
  {
  
      class QueryClass
  
      {
  
          recipiesNewDataSet recipiesNewDataSet = new recipiesNewDataSet();
  
          recipiesNewDataSetTableAdapters.IngredientTableAdapter ingredientTableAdapter = new recipiesNewDataSetTableAdapters.IngredientTableAdapter();
  
          ingredientTableAdapter.Fill(recipiesNewDataSet);
  
  
  
      }
  }
  </code></pre>