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. ADO AddNew Record

ADO AddNew Record

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelptutorial
8 Posts 5 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.
  • R Offline
    R Offline
    roshanak
    wrote on last edited by
    #1

    I want to add new records with my program to my database but I don't know how to do this . please help me.

    D J 2 Replies Last reply
    0
    • R roshanak

      I want to add new records with my program to my database but I don't know how to do this . please help me.

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

      Are you wanting to know how to use CRecordset::AddNew()?

      R 1 Reply Last reply
      0
      • D David Crow

        Are you wanting to know how to use CRecordset::AddNew()?

        R Offline
        R Offline
        roshanak
        wrote on last edited by
        #3

        yes I want to know how can I use this method in a dialog base application . please give me an example

        D 1 Reply Last reply
        0
        • R roshanak

          yes I want to know how can I use this method in a dialog base application . please give me an example

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

          Have you checked out MSDN, or Googled for examples?

          R 1 Reply Last reply
          0
          • D David Crow

            Have you checked out MSDN, or Googled for examples?

            R Offline
            R Offline
            roshanak
            wrote on last edited by
            #5

            yes but I cann't find something that help me. try { //update the current record //CGuard obj; piAdoRecordBinding->Update(&rsRecSet); //can we add a new record? if(m_pRs->Supports(adAddNew)) { piAdoRecordBinding->AddNew(&rsRecSet); } is it correct

            N T 2 Replies Last reply
            0
            • R roshanak

              yes but I cann't find something that help me. try { //update the current record //CGuard obj; piAdoRecordBinding->Update(&rsRecSet); //can we add a new record? if(m_pRs->Supports(adAddNew)) { piAdoRecordBinding->AddNew(&rsRecSet); } is it correct

              N Offline
              N Offline
              Nick Parker
              wrote on last edited by
              #6

              roshanak wrote: yes but I cann't find something that help me. Try: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Recordset.3a_.Adding.2c_.Updating.2c_.and_Deleting_Records_.28.ODBC.29.asp[^] -Nick Parker

              1 Reply Last reply
              0
              • R roshanak

                I want to add new records with my program to my database but I don't know how to do this . please help me.

                J Offline
                J Offline
                John M Drescher
                wrote on last edited by
                #7

                Use Carlos Antollini's set of ADO classes http://www.codeproject.com/database/caaadoclass1.asp[^] They do all the hard parts for you. John

                1 Reply Last reply
                0
                • R roshanak

                  yes but I cann't find something that help me. try { //update the current record //CGuard obj; piAdoRecordBinding->Update(&rsRecSet); //can we add a new record? if(m_pRs->Supports(adAddNew)) { piAdoRecordBinding->AddNew(&rsRecSet); } is it correct

                  T Offline
                  T Offline
                  Toni78
                  wrote on last edited by
                  #8

                  In this case AddNew is done through the CADORecordsetBinding class and since you don't know much about this subject, you should not use this method (until you improve your ADO skills) because it is not that straight forward. On the other hand, database programing is something that takes a couple of weeks at least to understand, so just by looking at examples won't work. // Afterall I realized that even my comment lines have bugs

                  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