title: IF Not Exist then Inseting a value in the table
body: <p>Using SQL Server 2005, vb.net </p>
  
  <p>Table1</p>
  
  <pre><code>Name FromDate ToDate
  
  Raja 12/02/2010 14/02/2010
  Ravi 14/02/2010 15/02/2010
  Ramu 18/02/2010 21/02/2010
  ...,
  
  Insert into Table1 values('" &amp; textbox1.text &amp; "', '" &amp; textbox2.text &amp; "'. '" &amp; textbox3.text &amp; "'", con)
  </code></pre>
  
  <p>When i try to insert a value into table1 it will compare the table values if it is same, It Should throw a error msg "Name and Date Already Exist" otherwise Insert a value.</p>
  
  <p>Before Inserting i want to check a textbox value with table value. </p>
  
  <p>Can any one give a sample idea or code for this.</p>