title: Oracle query works in SQL+ but returns no rows in VB.NET
body: <p>Help, any ideas??</p>
  
  <p>I am using the OLEDB adapter (Oracle OLEDB) with Oracle 10.2.0.3.0.  My code generates the SQL for the query, then when I execute it into an OLEDBDataReader, the HasRows is False.  However, if I output the contents of the query string, copy, and paste into SQL+ (logged in as the same user from the same client machine), it returns 993 rows.  What gives??</p>
  
  <p>Here's a segment of my code:</p>
  
  <pre><code>Dim DB As New OleDb.OleDbConnection(String.Format("{0};Password={1}", ConnectionString, DBPassword))
  Dim flowQuerySQL As String
  '... code to generate query
  Debug.Print(flowQuerySQL)
  Dim flowQueryCMD As New OleDb.OleDbCommand(flowQuerySQL, DB)
  Dim flowQuery As OleDb.OleDbDataReader = flowQueryCMD.ExecuteReader()
  While flowQuery.HasRows
      '...handle rows
  End While
  </code></pre>
  
  <p>The debug.print statement shows:</p>
  
  <pre><code>SELECT CLASS_ID, OBJECT_ID FROM TDM_SF_PROCESS WHERE CLASS_ID=853 AND TDM_END_TIME &gt;= '01-Jan-2009' AND TDM_END_TIME &lt; '31-May-2009' AND TDM_STATUS &lt;&gt; 1 AND TDM_STATUS &lt;&gt; 2
  </code></pre>