```
     MysqlConn = New MySqlConnection
    MysqlConn.ConnectionString = "server=localhost;userid=root;password=**********;database=librarydb;"
    Dim SDA As New MySqlDataAdapter
    Dim bSource As New BindingSource
    Dim dbDataSet As New DataTable
    Dim ds As New DataSet
    Dim Result As MySqlDataReader
    Try
        MysqlConn.Open()
        If ComboBox2.Text = "Author" Then
            Dim Query As String
            Query = "Select quantity as 'Qty',classification as 'Classification',author as 'Author',title as 'Title',call_number as 'Call Number',isbn_number as'ISBN Number' from librarydb.blist where author like'%" & TextBox1.Text & "%'"
            COMMAND = New MySqlCommand(Query, MysqlConn)
            SDA.SelectCommand = COMMAND
            SDA.Fill(dbDataSet)
            Result = COMMAND.ExecuteReader

            Dim search As Integer
            search = 0
            While Result.Read
                search = search + 1
            End While
            If search = 1 Then
                SDA.Fill(dbDataSet)
                DataGridView1.DataSource = dbDataSet

            Else
                MsgBox("No Datafound")
                MysqlConn.Close()
            End If
        End If

```

What i want my program do is If the user select the "author" in a combobox and write the name of the author in the textbox and it will display the results in the datagridview. Ive tried this code but does not work. It always fall to the else statement.