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. transaction - rollback in C ???

transaction - rollback in C ???

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionannouncement
10 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.
  • A Offline
    A Offline
    aa_zz
    wrote on last edited by
    #1

    hi everybody. now, i wish help for me this matter. when I update field "Pass" of table USER. if table USER have 10 records, but when update to records 5 ==> error, i need rollback all data when table not update, but if update 10 records success ==> update all. thanks very much.

    nothing

    C K 2 Replies Last reply
    0
    • A aa_zz

      hi everybody. now, i wish help for me this matter. when I update field "Pass" of table USER. if table USER have 10 records, but when update to records 5 ==> error, i need rollback all data when table not update, but if update 10 records success ==> update all. thanks very much.

      nothing

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      You posted no code (you even did'n mention the database you are dealing with): how can we help you?

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      1 Reply Last reply
      0
      • A aa_zz

        hi everybody. now, i wish help for me this matter. when I update field "Pass" of table USER. if table USER have 10 records, but when update to records 5 ==> error, i need rollback all data when table not update, but if update 10 records success ==> update all. thanks very much.

        nothing

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        Rollbacks should be supported by the database. So in C you should start a "transaction" which could get rolled back.

        Press F1 for help or google it. Greetings from Germany

        A 1 Reply Last reply
        0
        • K KarstenK

          Rollbacks should be supported by the database. So in C you should start a "transaction" which could get rolled back.

          Press F1 for help or google it. Greetings from Germany

          A Offline
          A Offline
          aa_zz
          wrote on last edited by
          #4

          this matter need application of VC++6.0 support, because SQL Server not support. sql server only support transaction 1 record. in C# it support this application by Transaction, but in VC++6.0 I don't know. wish your help. thanks very much

          nothing

          C K 2 Replies Last reply
          0
          • A aa_zz

            this matter need application of VC++6.0 support, because SQL Server not support. sql server only support transaction 1 record. in C# it support this application by Transaction, but in VC++6.0 I don't know. wish your help. thanks very much

            nothing

            C Offline
            C Offline
            CPallini
            wrote on last edited by
            #5

            aa_zz wrote:

            because SQL Server not support. sql server only support transaction 1 record.

            I bet my 2 cents the above sentence is false. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            A 1 Reply Last reply
            0
            • A aa_zz

              this matter need application of VC++6.0 support, because SQL Server not support. sql server only support transaction 1 record. in C# it support this application by Transaction, but in VC++6.0 I don't know. wish your help. thanks very much

              nothing

              K Offline
              K Offline
              KarstenK
              wrote on last edited by
              #6

              are we in the same sql server: http://msdn.microsoft.com/en-us/library/ms188929.aspx[^] here a plenty of possibilities: http://social.msdn.microsoft.com/Search/en-US?query=sql%20server%20c%2B%2B&ac=3[^] :mad:

              Press F1 for help or google it. Greetings from Germany

              A 1 Reply Last reply
              0
              • C CPallini

                aa_zz wrote:

                because SQL Server not support. sql server only support transaction 1 record.

                I bet my 2 cents the above sentence is false. :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                A Offline
                A Offline
                aa_zz
                wrote on last edited by
                #7

                i agree with you. but if you using plus string, it can update more records, but it will overload string :^) .

                nothing

                C 1 Reply Last reply
                0
                • A aa_zz

                  i agree with you. but if you using plus string, it can update more records, but it will overload string :^) .

                  nothing

                  C Offline
                  C Offline
                  CPallini
                  wrote on last edited by
                  #8

                  aa_zz wrote:

                  but if you using plus string, it can update more records, but it will overload string

                  I don't get you. :confused:

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  1 Reply Last reply
                  0
                  • K KarstenK

                    are we in the same sql server: http://msdn.microsoft.com/en-us/library/ms188929.aspx[^] here a plenty of possibilities: http://social.msdn.microsoft.com/Search/en-US?query=sql%20server%20c%2B%2B&ac=3[^] :mad:

                    Press F1 for help or google it. Greetings from Germany

                    A Offline
                    A Offline
                    aa_zz
                    wrote on last edited by
                    #9

                    i think, we can using "registry" to do it, but i don't using it. for examble :http://www.codeproject.com/KB/vista/VistaKTM.aspx nothing

                    K 1 Reply Last reply
                    0
                    • A aa_zz

                      i think, we can using "registry" to do it, but i don't using it. for examble :http://www.codeproject.com/KB/vista/VistaKTM.aspx nothing

                      K Offline
                      K Offline
                      KarstenK
                      wrote on last edited by
                      #10

                      consider learning something about databases!!! i guess that you are guessing. :(( if you have any question please pot also some code :thumbsup:

                      Press F1 for help or google it. Greetings from Germany

                      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