title: selecting in vb.net with ms access database
body: <p>I want to select some data in my table and I use this code :</p>
  
  <pre><code>Public Class frmLogin
  Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
              Dim t As New DataTable
      Dim adapter As OleDbDataAdapter = New OleDbDataAdapter()
      Dim cmd As OleDbCommand
      Dim reader As OleDbDataReader = Nothing
      Dim tuser As String = txtUsername.Text
  
      Dim sql As String = "SELECT * FROM dosen WHERE nip=tuser"
      Try
          cmd = New OleDbCommand(sql, conn)
          reader = cmd.ExecuteReader()
  
          While reader.Read
              MessageBox.Show(reader.GetString(0).ToString &amp; _
                              vbTab &amp; vbTab &amp; reader.GetString(1).ToString)
          End While
      Finally
          If reader IsNot Nothing Then reader.Close()
      End Try
  
  End Sub
  </code></pre>
  
  <p>But there is an error in <code>reader = cmd.ExecuteReader()</code> line. Anyone can help me?</p>