title: An unhandled exception of type 'System.NullReferenceException' occurred in WindowsFormsApplication1.exe
body: <p>I have a connection but it throws an error:</p>
  
  <pre><code>baglanti = new DataRelation("baglan",
                       ds.Tables["tblDeneme"].Columns["KategoriID"], 
                       ds.Tables["tblDeneme"].Columns["AltKategoriID"]);
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.NullReferenceException'
    occurred in WindowsFormsApplication1.exe</p>
  </blockquote>