Ok, I have these SQL statements for a Visual Basic homework project, that search a database, and I want to change it from an exact search like it has now to one that can do "not exact" searches. I know that I need to put in "LIKE" somewhere in the statements I am just unsure of where I have to put it
If OptfindCD = True Then
sqlcount = "SELECT count(*) from [CD Explorer] where [CD Name] = " + QUOTE + txtsearch.Text + QUOTE
SqlStmt = "SELECT [CD Name], [Path], [File Name] from [CD Explorer] where [CD Name] = " + QUOTE + txtsearch.Text + QUOTE
ElseIf optfindfile = True Then
sqlcount = "SELECT count(*) from [CD Explorer] where [File Name] = " + QUOTE + txtsearch.Text + QUOTE
SqlStmt = "SELECT [CD Name], [Path], [File Name] from [CD Explorer] where [File Name] = " + QUOTE + txtsearch.Text + QUOTE
End If
Is it supposed to be where the "=" sign is?
If OptfindCD = True Then
sqlcount = "SELECT count(*) from [CD Explorer] where [CD Name] = " + QUOTE + txtsearch.Text + QUOTE
SqlStmt = "SELECT [CD Name], [Path], [File Name] from [CD Explorer] where [CD Name] = " + QUOTE + txtsearch.Text + QUOTE
ElseIf optfindfile = True Then
sqlcount = "SELECT count(*) from [CD Explorer] where [File Name] = " + QUOTE + txtsearch.Text + QUOTE
SqlStmt = "SELECT [CD Name], [Path], [File Name] from [CD Explorer] where [File Name] = " + QUOTE + txtsearch.Text + QUOTE
End If
Is it supposed to be where the "=" sign is?