DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: transaction - rollback in C++6.0 ???

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    transaction - rollback in C++6.0 ???

    hi everybody.
    now, i wish help for me this matter.

    when I update field "Pass" of table USER. if table USER have 100000 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.
    in C#, it have support this matter, but in C++6.0 I don't know.

    thanks very much.

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    This sounds like a database (?). If so, you must use libraries to connect c++ to a database, this is not part of the c++ language naturally. Visual 6.0 is very old but does have, if I remember, the old mircosoft JET engine and basic database commands.

    I am unsure of how to do a rollback with this tool. The brute force way may work -- get the records and store them, if you have a failure you send the original data back (but, if you are having failures, will this work??). But there is probably a command you can send to the database server to roll back or undo the last command, this is probably just and SQL command (?).

    An issue is, did anything change when your command failed? If your command failed, its possible no rollback is needed because its possible nothing was changed. This may be something to test, or it may relate to the error condition/code, maybe find out if you even need the rollback?

  3. #3
    Join Date
    Apr 2010
    Posts
    2
    thanks for your help. in database, it only transaction 1 record, i think, we need using tool of VC++6.0.

Similar Threads

  1. Rollback Transaction Statement
    By sheryl kemp in forum Database
    Replies: 0
    Last Post: 10-03-2001, 10:43 AM
  2. Replies: 0
    Last Post: 09-19-2001, 09:14 AM
  3. Re: Oracle Nested Transactions
    By Tim in forum Database
    Replies: 0
    Last Post: 06-20-2001, 09:21 AM
  4. Replies: 3
    Last Post: 03-01-2001, 11:49 PM
  5. how to rollback a stored proc transaction
    By ranga raghunathan in forum Enterprise
    Replies: 7
    Last Post: 06-05-2000, 08:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center