Results 1 to 4 of 4

Thread: [RESOLVED] Please Help - VB 6.0 and Select command

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    121

    Resolved [RESOLVED] Please Help - VB 6.0 and Select command

    I am using vb 6.0 and i am using this command

    "SELECT * FROM personalinfo WHERE personalinfo.empid = " &
    "'" & txtemid.txt & "'"

    my problem is i would like to search also the position of a particular person, but something list a comparison LIKE command is use to compare.. but i would like to compare a word to a field for intance....

    Structural Welder
    Pipe Welder
    Welder Supervisor
    Welder Inspector

    my keyword is "welder"

    The above is sample only, when i type the word.... "welder" the query will display the above position even the word is in the start middle or last.
    Is it possible? please help anyone... plz thank you.

    What should i place instead of "LIKE"

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Please Help - VB 6.0 and Select command

    Which database are you using?

    For access the query would look like this
    PHP Code:
    "SELECT * FROM personalinfo WHERE personalinfo.empid like ('*" txtemid.txt "*')" 
    And for SQL Server it will look like this
    PHP Code:
    "SELECT * FROM personalinfo WHERE personalinfo.empid like ('%" txtemid.txt "%')" 
    Last edited by Shuja Ali; Aug 25th, 2006 at 01:49 AM.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    121

    Re: Please Help - VB 6.0 and Select command

    i am using access database 2000 version

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    121

    Re: [RESOLVED] Please Help - VB 6.0 and Select command

    thanks friend.... its working... thanks for the information..

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