Can any guy tell me what is the differnce between a datareader and a dataadapter? Also what are the other method to search data through SQL queries??

Datareader needs an opened database connection.
Its an Connected Oriented Architecture
example

Private Sub loop_QTY()
        Dim sql As String = "SELECT Item_Qty from tbl_Products WHERE Item_Name = '" & cbo_Items.Text & "' "

        Dim cmd As New OleDbCommand(sql, con)
        Dim dr As OleDbDataReader

        cbo_QTY.Items.Clear()
        con.Open()
        dr = cmd.ExecuteReader()
        While dr.Read()
            cbo_QTY.Items.Add(dr(0))
        End While
        con.Close()
    End Sub

Dataadapter does not need an Open Database connection
Its an Disconnected Access

 Dim dt As New DataTable
Dim da As New SqlDataAdapter("select * from data", cn)
da.Fill(dt)
For Each row As DataTable In ds.Tables("data").Rows
If row(0).ToString = ComboBox1.Text Then
TextBox3.Text = dt.Rows(0)("type").ToString()
TextBox4.Text = dt.Rows(1)("shape").ToString()
TextBox5.Text = dt.Rows(2)("size").ToString()
TextBox6.Text = dt.Rows(3)("place").ToString()
TextBox7.Text = dt.Rows(1)("weight").ToString()
TextBox3.ReadOnly = True
TextBox4.ReadOnly = True
TextBox5.ReadOnly = True
TextBox6.ReadOnly = True
TextBox7.ReadOnly = True
Exit For
End If
Next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.