Results 1 to 5 of 5

Thread: [RESOLVED] Help in Searching Any words in textbox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2007
    Posts
    22

    Resolved [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

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    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

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2007
    Posts
    22

    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.

  4. #4
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    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

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2007
    Posts
    22

    Re: Help in Searching Any words in textbox

    hi bruce tnx

    solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width