Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problem In Using Wildcard Characters

Problem In Using Wildcard Characters

Scheduled Pinned Locked Moved Visual Basic
databasehelpcsharpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    V G
    wrote on last edited by
    #1

    Hi all! I have a Search application that has VB.net as the frontend and MS Access as the backend. I need to execute a query with a like clause "Select * from employee where emp_name like '*a*' This returns results results if i execute it directly at the db side; but returns no results on executing it through the application. (does not return any results if i use a wildcard charecter) Can anyone help me with this?? Thanks!!

    S 1 Reply Last reply
    0
    • V V G

      Hi all! I have a Search application that has VB.net as the frontend and MS Access as the backend. I need to execute a query with a like clause "Select * from employee where emp_name like '*a*' This returns results results if i execute it directly at the db side; but returns no results on executing it through the application. (does not return any results if i use a wildcard charecter) Can anyone help me with this?? Thanks!!

      S Offline
      S Offline
      Steven J Jowett
      wrote on last edited by
      #2

      Assuming you are using ADO or ADO.NET then the wildcard parameters are as follows % = Match any string _ = Match any character

      Steve Jowett ------------------------- Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'

      V T 2 Replies Last reply
      0
      • S Steven J Jowett

        Assuming you are using ADO or ADO.NET then the wildcard parameters are as follows % = Match any string _ = Match any character

        Steve Jowett ------------------------- Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'

        V Offline
        V Offline
        V G
        wrote on last edited by
        #3

        I got it alright, moral of the story is eventhough u are using an Access db, use standard wildcards used in sql. Thanks!!!!

        1 Reply Last reply
        0
        • S Steven J Jowett

          Assuming you are using ADO or ADO.NET then the wildcard parameters are as follows % = Match any string _ = Match any character

          Steve Jowett ------------------------- Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'

          T Offline
          T Offline
          Tom Deketelaere
          wrote on last edited by
          #4

          in addition I'd like to add (because I just had a simaler program where I encounterd this problem) that the wildcard * (or %) will not return 'null' values. (I haven't found any wildcard that will in access) so you will need to make shure that there is always a value in you're db fields otherwise I'm afraid you search will not work perfectly

          V 1 Reply Last reply
          0
          • T Tom Deketelaere

            in addition I'd like to add (because I just had a simaler program where I encounterd this problem) that the wildcard * (or %) will not return 'null' values. (I haven't found any wildcard that will in access) so you will need to make shure that there is always a value in you're db fields otherwise I'm afraid you search will not work perfectly

            V Offline
            V Offline
            V G
            wrote on last edited by
            #5

            yess. Thanks!!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups