title: SQL Type Convervsion in C#
body: <p>I admit that this may be prompted by not having an intimate knowledge of SQL, but I have a Dataset with an integer column named Year. If I write the SQL query:</p>
  
  <pre><code>selectstring = 
    @"SELECT Author, 
             Title,
             Year, 
             Keywords, 
             Location 
        FROM Books 
       WHERE Year = iYear";
  </code></pre>
  
  <p>where iYear has previously been declared as an integer, running a cursor over the SQL statement tells me that both Year and iYear are strings. Why does this type conversion take place?
    This is an easy to solve problem here but when one is working with F types with a lot of digits after the decimal point it would seem to be harder unless simple casting works.</p>