title: Using SQLDataReader instead of recordset
body: <p>I am new to this and had this question. Can I use SQLDataReader instead of a Recordset. I want to achieve the following result in an SQLDataReader.</p>
  
  <pre><code>Dim dbConn As New ADODB.Connection
  Dim rs As New ADODB.Recordset
  Dim sqlstr As String = "SELECT Name,Status FROM table1 WHERE id=" + item_id.Value.ToString
  rs.Open(SQL, dbConn)
  While Not rs.EOF
     txtName.Text = rs.Fields.Item("Name").Value
     ddlstatus.SelectedIndex = 1
     rs.MoveNext()
  End While
  rs.Close()
  rs = Nothing
  dbConn.Close()
  dbConn = Nothing
  </code></pre>
  
  <p>Can I replace recordset with SQLDataReader and if I can can you please show me the changes in code?</p>