title: Return a variable value and output from PL/SQL code block to C#
body: <p>I have a code block and I am assigning values to a variable to keep track what is going on while execution of the block.</p>
  
  <pre><code>begin 
   declare 
     stage number := 0; 
     begin
      stage := 1;
      INSERT INTO Country ( code, name) VALUES (1 , 'xxxx');
      stage := 2;
      INSERT INTO City ( code, name) VALUES (1 , 'yyyy');
      DBMS_OUTPUT.PUT_LINE('DONE:'); 
  COMMIT; 
  
  EXCEPTION  -- exception handlers begin 
    WHEN OTHERS THEN  -- handles all other errors 
     DBMS_OUTPUT.PUT_LINE('Error occured, rollback...');  
     DBMS_OUTPUT.get_LINE(:1, :2);
     stage := -1;
     ROLLBACK; 
    end;
  end; 
  </code></pre>
  
  <p>I want to ask you how can I get stage value and the value inside DBMS_OUTPUT.PUT_LINE() using C#. I know that this has been already answered but unfortunately I failed finding it.</p>