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. ODBC database problem

ODBC database problem

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpannouncement
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.
  • D Offline
    D Offline
    Deepu Antony
    wrote on last edited by
    #1

    Hi all I am using a database application program using ODBC with MS Access as the database. While navigating through the database,it is missing a particular row. my code look like this m_rs.Open( CRecordset::snapshot, _T( "SELECT * FROM DAUArinc717Frame2" ) ); m_rs.Move( Index ); for(i=0;i<128;i++) { data = (BYTE)strtoul( m_edit2, 0, 16 ); str.Format("%d",data); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); b2 = strtoul( m_edit2, 0, 16 )>> 8; str.Format("%d",b2); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); } I am updating to the database, the values read from the GUI.In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row. Please help me.. Thanks in advance Regards Deepu

    D 1 Reply Last reply
    0
    • D Deepu Antony

      Hi all I am using a database application program using ODBC with MS Access as the database. While navigating through the database,it is missing a particular row. my code look like this m_rs.Open( CRecordset::snapshot, _T( "SELECT * FROM DAUArinc717Frame2" ) ); m_rs.Move( Index ); for(i=0;i<128;i++) { data = (BYTE)strtoul( m_edit2, 0, 16 ); str.Format("%d",data); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); b2 = strtoul( m_edit2, 0, 16 )>> 8; str.Format("%d",b2); m_rs.Edit(); m_rs.m_Data = str; m_rs.Update(); m_rs.MoveNext(); } I am updating to the database, the values read from the GUI.In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row. Please help me.. Thanks in advance Regards Deepu

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

      Deepu Antony wrote:

      In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row.

      So does Update() throw an (CDBException) exception?

      "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      D 1 Reply Last reply
      0
      • D David Crow

        Deepu Antony wrote:

        In this process when i==3,in that particular location in my database(row==264),it is skipping without updating and is moving to the next row.

        So does Update() throw an (CDBException) exception?

        "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        D Offline
        D Offline
        Deepu Antony
        wrote on last edited by
        #3

        Thanks for the reply. it is working now.I didn't changed anything.Sometimes it happens like that. Don't know the exact reason

        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