C#: Object reference not set to an instance of an object
<p>I get the following error:</p>

<blockquote>
  <p>Object reference not set to an
  instance of an object</p>
</blockquote>

<p>This is my C Sharp code:</p>

<pre><code>      DataTable tableAcces = dsAcces.Tables["dsPrinterAcces"];
      DataTable tableMDF = dsAcces.Tables["dsPrinterMDF"];
      DataRow newrow = null;


      foreach(DataRow dr in tableAcces.Rows)
       {
           newrow = tableMDF.NewRow();

        newrow["PRINTER_ID"] = dr["PRINTER_ID"];
        newrow["MERK"] = dr["MERK"];
        newrow["MODEL"] = dr["MODEL"];
        newrow["LOKAAL_ID"] = dr["LOKAAL_ID"];

        tableMDF.Rows.Add(newrow);
      }

      daMDF.Update(dsMDF, "dsPrinterMDF");
      lblSucces.Text = "Gelukt. De tabel printers is overgezet.";
    }
</code></pre>

<p>In this line, he throws the error:</p>

<pre><code>newrow = tableMDF.NewRow();
</code></pre>

<p>Thanks a lot,</p>

<p>Vincent</p>
