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. C / C++ / MFC
  4. Finding records ...

Finding records ...

Scheduled Pinned Locked Moved C / C++ / MFC
databasegame-devquestionhtmlcom
3 Posts 2 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.
  • H Offline
    H Offline
    Hadi Rezaee
    wrote on last edited by
    #1

    Hi all, I wanna find all records that the name field is "Ali" or like "Ali" ... for example "AliReza" or "alireza" !!! How can i do that ? Can i use of Find function or i must use of SQL string ??? I'm using of DAO ... My month article: Game programming by DirectX by Lan Mader. Please visit in: www.geocities.com/hadi_rezaie/index.html Hadi Rezaie

    S 1 Reply Last reply
    0
    • H Hadi Rezaee

      Hi all, I wanna find all records that the name field is "Ali" or like "Ali" ... for example "AliReza" or "alireza" !!! How can i do that ? Can i use of Find function or i must use of SQL string ??? I'm using of DAO ... My month article: Game programming by DirectX by Lan Mader. Please visit in: www.geocities.com/hadi_rezaie/index.html Hadi Rezaie

      S Offline
      S Offline
      skfnmuisl dmufa oi
      wrote on last edited by
      #2

      Hi. The solution is very simple: SELECT * FROM Table WHERE Name Like 'Ali*' The question is, how to implement this: 1) If you're using Recordset-classes derieved by the classwizard, you have to modify the CDaoRecordset::m_strFilter member (like CMySet::m_strFilter = "Name like 'Ali*'). Remember that there is no 'WHERE'. 2) If you're using recordsets returned upon an querydef, just open the querydef with the whole SQL-string, including that 'like' condition. If you have further questions, you can contact me by eMail, as I'm often in touch with DAO and SQL in my projects. -------------------------------------------------- "Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. "

      H 1 Reply Last reply
      0
      • S skfnmuisl dmufa oi

        Hi. The solution is very simple: SELECT * FROM Table WHERE Name Like 'Ali*' The question is, how to implement this: 1) If you're using Recordset-classes derieved by the classwizard, you have to modify the CDaoRecordset::m_strFilter member (like CMySet::m_strFilter = "Name like 'Ali*'). Remember that there is no 'WHERE'. 2) If you're using recordsets returned upon an querydef, just open the querydef with the whole SQL-string, including that 'like' condition. If you have further questions, you can contact me by eMail, as I'm often in touch with DAO and SQL in my projects. -------------------------------------------------- "Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. "

        H Offline
        H Offline
        Hadi Rezaee
        wrote on last edited by
        #3

        Thanks aloooooooooot for your helps ... ;) My month article: Game programming by DirectX by Lan Mader. Please visit in: www.geocities.com/hadi_rezaie/index.html Hadi Rezaie

        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