[RESOLVED] Help in Searching Any words in textbox
Hi all
Can anyone help me how to search any words in textbox . i'm using vb6.0 and oracle as backend.. using sql stataments.
i have textbox,button and listview.
to search something like this.
if i enter a word in textbox : "the bible " then all records in database
containing "the" and "bible" will appear.
ty
Re: Help in Searching Any words in textbox
You state your using SQL; if so the add the contents of TextBox.Text to the SQL query.
It may help if you post what you have so far in relation to the SQL code you have so far :)
Re: Help in Searching Any words in textbox
hello
sql3= "SELECT * FROM books"
sql3 = sql3 & " WHERE title LIKE '*" & Text1.Text & "*'"
but this is wrong it search for a whole word, in one title of the books.
Re: Help in Searching Any words in textbox
Ok, I Understand, I didn't read the last line of your post...
One way may be to breack up the words entered in the TextBox into an array, and then assemble each element into the SQL.
So, you may have (psedudo) .... WHERE title LIKE 'the' or 'bible' etc
Re: Help in Searching Any words in textbox