title: ORA-01858: a non-numeric character was found where a numeric was expected
body: <p>I have a function that takes in a collection of <code>SearchCriteria</code> Objects:
  columnName or Key, operator (<code>&lt;</code>, <code>&lt;=</code>, <code>like</code>, etc), and value.</p>
  
  <p>The function builds up a Command Object.
  I made the value a command parameter and now my Unit Tests will not work for Dates.
  But all of my Unit Tests work against all other datatypes like varchar.</p>
  
  <p>In the debugger, one of my date unit tests that fail end up with the cmd looking like this:</p>
  
  <pre><code>SELECT * FROM (SELECT DocumentId 
                 FROM idx1_AuthLetters a 
                 INNER JOIN Documents b ON a.DocumentId = b.Id
                 WHERE Status in ('L','S','V')  AND  letter_date &lt;= :1 
                 ORDER BY DOCUMENTID ) 
  WHERE RowNum &lt;= 14 
  </code></pre>
  
  <p>I did have the parameter named like :letter_date.  But I might have :letter_date >= ### &amp;&amp; :letter_date &lt;= ### where I am looking between two dates. I cannot have the same parameter name twice so I use an i++ counter as parameter name while I am looping through all of my SearchCriteria Objects. Odd to see a parameter named like this I know but it is working for the most part.</p>
  
  <p>If I take this and put in my Query Window, and look inspect the param value and plug that in:</p>
  
  <pre><code>SELECT * FROM (SELECT DocumentId 
                 FROM idx1_AuthLetters a 
                 INNER JOIN Documents b ON a.DocumentId = b.Id 
                 WHERE Status in ('L','S','V')  AND  
                       letter_date &lt;= TO_DATE('2013-1-21', 'yyyy-mm-dd') 
                 ORDER BY DOCUMENTID ) 
  WHERE RowNum &lt;= 14 
  </code></pre>
  
  <p>it works fine.
  But it will not work from the C# code from my Unit Test.
  Again this works for all other data types.
  And it use to work before I parameterized the value in the select statement.</p>
  
  <p>Exact error is:</p>
  
  <blockquote>
    <p>{"ORA-01858: a non-numeric character was found where a numeric was expected"}</p>
  </blockquote>