Results 1 to 4 of 4

Thread: SQL Select statement for VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    12
    I am curious to know if there is someone out there that may be able to help me with select statements. I have a good idea of what I am doing. However this one I cannot figure out. Here it is!

    I am opening a Form, Placing an ADO Data Control on the form. I set up the file I wish to access and set my OLE DB Provider to JET 3.51, Change cursor type to adOpenDymanic, set CommandType to adCommandText, and in the RecordSource I place this:
    SELECT * FROM Inventory WHERE User like 'p*'

    If i am looking for something with a "p" as in "public" in the database, the search does not find.

    But, if I type "public" instead of "p*" the search will return the value that I wish

    I would like to mention that when using the VisiData Manager the search works, but for some reason it won't when inside my application


    Thank you to all who can help,
    soundjam

  2. #2
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Try the Like statement:

    SELECT * FROM Inventory WHERE User Like 'p*';

    Good Luck
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  3. #3
    New Member
    Join Date
    Nov 2000
    Location
    Costa Rica
    Posts
    8

    Thumbs up

    See if Access or whatever you're using supports
    this Like 'p%';
    Zopailot

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    12
    I tried it and the 'p%' worked great.

    Thank you for your replies
    soundjam

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