ss = "select * from Donator where sname like @sname and city like @city and atpo like @atpo and taluka like @taluka and dist like @dist and pin like @pin" & _
" and letter like @letter and notes like @notes and other like @other"
com = New OleDbCommand(ss, con)
com.Parameters.AddWithValue("@sname", "%" + TextBox12.Text + "%")
com.Parameters.AddWithValue("@city", "%" + TextBox13.Text + "%")
com.Parameters.AddWithValue("@atpo", "%" + TextBox14.Text + "%")
com.Parameters.AddWithValue("@taluka", "%" + TextBox15.Text + "%")
com.Parameters.AddWithValue("@dist", "%" + TextBox16.Text + "%")
com.Parameters.AddWithValue("@pin", "%" + TextBox17.Text + "%")
com.Parameters.AddWithValue("@letter", "%" + TextBox19.Text + "%")
com.Parameters.AddWithValue("@notes", "%" + TextBox20.Text + "%")
com.Parameters.AddWithValue("@other", "%" + TextBox21.Text + "%")
con.Open()
dr = com.ExecuteReader()
While dr.Read
x = DataGridView1.Rows.Add(+1)
DataGridView1.Rows(x).Cells(0).Value = dr(0)
DataGridView1.Rows(x).Cells(1).Value = dr(2)
DataGridView1.Rows(x).Cells(2).Value = dr(1)
DataGridView1.Rows(x).Cells(3).Value = dr(3)
address = dr(4) + ", " + dr(5) + ", " + dr(6) + ", " + dr(7) + ", " + dr(25) + ", " + dr(8) + ", " + dr(9) + ", " + dr(10)
DataGridView1.Rows(x).Cells(4).Value = address
DataGridView1.Rows(x).Cells(5).Value = dr(11)
address1 = dr(12) + ", " + dr(13) + ", " + dr(14) + ", " + dr(15) + ", " + dr(26) + ", " + dr(16) + ", " + dr(17) + ", " + dr(18)
DataGridView1.Rows(x).Cells(6).Value = address1
DataGridView1.Rows(x).Cells(7).Value = dr(19)
DataGridView1.Rows(x).Cells(8).Value = dr(20)
DataGridView1.Rows(x).Cells(9).Value = dr(21)
DataGridView1.Rows(x).Cells(10).Value = dr(22)
DataGridView1.Rows(x).Cells(11).Value = dr(23)
End While
con.Close()