how can i change this command so that i can use LIKE, instead of " = " in the query (the part in red) ?
Code:
Private Sub doCommand()
command = New OleDb.OleDbCommand("Select Patient_ID, SS_Patient_ID, First_Name, Middle_Name, Last_Name, Date_of_Birth from Demographics [COLOR=Red]where First_Name = ? and Last_Name = ?[/COLOR]", Me.OleDbConnection2)
command.Parameters.Add(New OleDb.OleDbParameter("Fname", OleDb.OleDbType.VarChar, 20))
command.Parameters.Add(New OleDb.OleDbParameter("Lname", OleDb.OleDbType.VarChar, 20))
command.Prepare()
command.Parameters.Item("Fname").Value() = Me.TextBox1.Text
command.Parameters.Item("Lname").Value() = Me.TextBox2.Text
End Sub