Results 1 to 6 of 6

Thread: [2005] Like Query

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Posts
    104

    Thumbs down [2005] Like Query


    cmd.CommandText = "SELECT * FROM Employee WHERE First_name LIKE '" & Search.Text & "*'"
    cmd.Connection = cn
    cmd.CommandType = CommandType.Text
    da = New OleDbDataAdapter(cmd)
    da.Fill(searcht)
    details.DataSource = searcht


    I m trying to search a user with this Bt i cannot get data and getting error

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Posts
    104

    Re: [2005] Like Query

    no one knws

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [2005] Like Query

    And I've got eels in my hovercraft.....

    well, first you have to give it more than 30 minutes... many of us have other things in life to do... and secondly, you've told us nothing about the problem. what you ahve done is to drag your car into the shop and announce "It's broken" ... but what you failed to mention was that "there was a loud bang, some smoke, and the engine blew up"....

    Ok, so, you are getting an error... great, that's fine... WHAT error? I mean, there are litterally thousands of different kinds of errors out there. Are you getting a "Check Engine" light? Are you getting a redflashing light? did toast pop out of your CD drive?

    Point I'm trying to make is DETAILS... we need DETAILS to diagnose the problem.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Posts
    104

    Re: [2005] Like Query

    Sry for dat..

    and i resolved my problem...

    i m using * insted of %

  5. #5
    Hyperactive Member xxarmoxx's Avatar
    Join Date
    Mar 2007
    Posts
    378

    Re: [2005] Like Query

    Ya, what he said :P

  6. #6
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: [2005] Like Query

    Just be careful if this is going to be a real applications for users to use.
    It's 100% sql injection enabled.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

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