tresehulyo
Member
- Joined
- Sep 1, 2009
- Messages
- 16
- Programming Experience
- Beginner
How to Put space before and after Search_Textbox.Text
for example the Search_Textbox.Text is "Inside"
i want my sql command to WHERE Title Like " Inside" OR Title Like "Inside "
with space
for example the title of book is "The Brown Coward"
if i search "Cow" it will not return that because it's only a part of word
am i right if search in Cow with space before after the word " Cow" "Cow "
for example the Search_Textbox.Text is "Inside"
i want my sql command to WHERE Title Like " Inside" OR Title Like "Inside "
with space
VB.NET:
Dim cmd As New OleDb.OleDbCommand("select * from books where Title LIKE ' " & Search_Textbox.Text & "' or Title LIKE '" & Search_Textbox.Text & " & ' ", con)
for example the title of book is "The Brown Coward"
if i search "Cow" it will not return that because it's only a part of word
am i right if search in Cow with space before after the word " Cow" "Cow "