I have these lines of codes and Im trying to look into my database for soundex results but apparently it's not returning any result.
con.Open()
Try
Dim query As String
query = "SELECT * FROM table_name WHERE column_name LIKE CONCAT('" & "%" & "',SOUNDEX('" & input & "'),'" & "%" & "')"
cmd = New MySqlCommand(query, con)
adapter.SelectCommand = cmd
reader = cmd.ExecuteReader
Dim list As New ListViewItem
While reader.Read()
list = ListView1.Items.Add(dr(1).ToString())
list.SubItems.Add(dr(2).ToString())
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
con.Close()
It doesn't even throw exception on MessageBox.
To ensure there is data returned from my database before i did the query above, i did select * from table_name
.
Thanks!