|
-
Oct 6th, 2007, 03:54 AM
#1
Thread Starter
Junior Member
[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
-
Oct 6th, 2007, 04:12 AM
#2
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
-
Oct 6th, 2007, 06:27 AM
#3
Thread Starter
Junior Member
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.
-
Oct 6th, 2007, 06:35 AM
#4
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
-
Oct 6th, 2007, 05:56 PM
#5
Thread Starter
Junior Member
Re: Help in Searching Any words in textbox
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|