Public Sub searchSpecial(ByVal UserInput) conn.ConnectionString = c_string_special conn.Close() Dim cmd As New OleDbCommand Dim dr As OleDbDataReader If conn.State = ConnectionState.Closed Then conn.Open() End If With cmd .Connection = conn .CommandText = "SELECT * FROM fear WHERE sentence LIKE '% %'" .CommandType = CommandType.Text dr = .ExecuteReader End With If dr.Read() Then Dim x = dr.Item("sentence") If x.ToString.Contains(UserInput) Or UserInput.ToString.Contains(x) Then MsgBox(UserInput) End If End If conn.Close() End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)