title: Attempting to load a datatable - Operation is not valid due to the current state of the object
body: <p>I'm trying to connect &amp; query an Oracle DB and load the results into a datatable but I keep getting the 'operation is not valid due to the current state of the object' error for the code below:</p>
  
  <pre><code>Using conn As New OracleConnection(oradb)
  
          Try
  
              cmd = New OracleCommand()
              da = New OracleDataAdapter(cmd)
              dteDTK = New DataTable()
              conn.Open()
              cmd.CommandText = "SELECT * FROM TABLE1"
              cmd.CommandType = CommandType.Text
              da.Fill(dteDTK)
  
          Catch ex As OracleException
  
              MessageBox.Show(ex.Message.ToString())
  
          Finally
  
              conn.Close()
              conn.Dispose()
  
          End Try
  
  End Using
  </code></pre>
  
  <p>The error throws on the 'da.Fill(dteDTK)' command. What am I missing here?</p>