title: how to search in vb.net and populate info in text boxes and combo boxes using query
body: <p>I have VB.net project in which i need to search using a urno and it should populate info in all the textboxes and combo boxes that are on the form and it is the same form from which the data is stored in the database.here is the code</p>
  
  <pre><code>Public Class MBAUpdate
      Dim con As New OleDb.OleDbConnection()
      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
          Try
              'Dim da As OleDb.OleDbDataAdapter
              Dim dbprovider As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Taher\Documents\Visual Studio 2010\Projects\WindowsApplication1\WindowsApplication1\Database1.accdb;Persist Security Info=False;"
              Me.con = New OleDb.OleDbConnection()
              con.ConnectionString = dbprovider
              con.Open()
  
              Dim sqlquery As String = "SELECT * FROM MBA WHERE urno=" &amp; CInt(txtb1.Text) &amp; ";"
              Dim sqlcommand As New OleDb.OleDbCommand(sqlquery, con)
              Dim ds As DataSet
  
              With sqlcommand
                  .CommandText = sqlquery
                  .Connection = con
                  .ExecuteReader()
              End With
  
              ' MsgBox("Record Added")
          Catch ex As Exception
              MsgBox(ex.ToString)
          End Try
  
      End Sub
  End Class
  </code></pre>
  
  <p>any ideas how to achieve this did quite googling did'nt help either....</p>