Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6030433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:02:09+00:00 2026-05-23T05:02:09+00:00

I’ve a .Net 3.5 winforms application in which am running multiple steps. Each step

  • 0

I’ve a .Net 3.5 winforms application in which am running multiple steps.
Each step does some calculation and calls one or more stored procs.Some of these stored procs do multiple updates/inserts in the tables in the oracle database.

App UI has “process” and “cancel process” buttons for each step.If the use hits cancel process button, the application is supposed to rollback the database state to its previous state…ie. make the transaction ATOMIC.

So, my question here is, is this possible..?and if yes, to achieve this atomicity, what all things I need to take care of in the app and db side?

Do I need to use .Net’s transaction API here?Also, is it required to use BEGIN/COMMIT TRANSACTION blocks in those stored procs??

Please share your thoughts.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:02:10+00:00Added an answer on May 23, 2026 at 5:02 am

    First, yes, and second, your C# app (specifically the task layer) should manage the transactions, the sprocs should NOT be transactional unless you can guarantee the ability to do nested transactions that roll back when the parent rolls back (and I can’t speak on that point WRT oracle)

    http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracleconnection_methods%28v=VS.71%29.aspx

    With your OracleConnection object, before you begin all your work, call BeginTransaction(). Then do all your OracleCommand operations with that connection.

    Then if you call Transaction.RollBack or Transaction.Commit all sproc work you do should roll back or commit.

    Example right from the link:

    public void RunOracleTransaction(string myConnString)
    {
       OracleConnection myConnection = new OracleConnection(myConnString);
       myConnection.Open();
    
       OracleCommand myCommand = myConnection.CreateCommand();
       OracleTransaction myTrans;
    
       // Start a local transaction
       myTrans = myConnection.BeginTransaction(IsolationLevel.ReadCommitted);
       // Assign transaction object for a pending local transaction
       myCommand.Transaction = myTrans;
    
       try
       {
     myCommand.CommandText = "INSERT INTO Dept (DeptNo, Dname, Loc) values (50,     'TECHNOLOGY', 'DENVER')";
         myCommand.ExecuteNonQuery();
     myCommand.CommandText = "INSERT INTO Dept (DeptNo, Dname, Loc) values (60,     'ENGINEERING', 'KANSAS CITY')";
         myCommand.ExecuteNonQuery();
         myTrans.Commit();
         Console.WriteLine("Both records are written to database.");
       }
       catch(Exception e)
       {
         myTrans.Rollback();
         Console.WriteLine(e.ToString());
         Console.WriteLine("Neither record was written to database.");
       }
       finally
       {
         myConnection.Close();
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.