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. Database Problem

Database Problem

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpquestion
3 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.
  • G Offline
    G Offline
    Ghasrfakhri
    wrote on last edited by
    #1

    Hello Ihave a programe store about 40,000 record in database,and make report from them . but the programe work so slowly when I want to find last ID number. I use ODBC to connect to database. to get the last ID I use m_strFileter and m_strSort properties & Requery MethodRequery . wat can I do to get better performense ? (please show me a way to use database:confused: ) tnX Iman Ghasrfakhri

    M D 2 Replies Last reply
    0
    • G Ghasrfakhri

      Hello Ihave a programe store about 40,000 record in database,and make report from them . but the programe work so slowly when I want to find last ID number. I use ODBC to connect to database. to get the last ID I use m_strFileter and m_strSort properties & Requery MethodRequery . wat can I do to get better performense ? (please show me a way to use database:confused: ) tnX Iman Ghasrfakhri

      M Offline
      M Offline
      Manfred Staiger
      wrote on last edited by
      #2

      If your database is MS ACCESS you should use DAO instead of ODBC, that means CDaoDatabase and CDaoRecordset and not CDatabase and CRecordset. To my experience this is much more faster. Hope this helps. MS

      1 Reply Last reply
      0
      • G Ghasrfakhri

        Hello Ihave a programe store about 40,000 record in database,and make report from them . but the programe work so slowly when I want to find last ID number. I use ODBC to connect to database. to get the last ID I use m_strFileter and m_strSort properties & Requery MethodRequery . wat can I do to get better performense ? (please show me a way to use database:confused: ) tnX Iman Ghasrfakhri

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        The "last ID number" field must be indexed. The speed difference between ODBC and DAO, if any, is negligible.


        A rich person is not the one who has the most, but the one that needs the least.

        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