locked
how i can disable autocommit to oracle from c# RRS feed

  • Question

  • hai my friends

    i need to know how i can disable autocommit from c#( i run my quey it is automatically commiting)

    i hace oracleconnection cn="   ";
    myqry="insert into table_name as select * from table_local";
    try
    cn.open()
    {
    oraclecommand mycom=neworaclecommand(myqry,cn)
    mycom.executenonquery()
    message.show("data inserted successfully")
    }
    catch(exeception ex)
    {

    message.show ex.tostring()
    }

    working fine

    suppose i am inserting a bulk data like 100,000 together

    i need to complete roll back if there is any error

    how i can rollback or disable autocommit from c#.. pls suggest me one solution

    regards
    hot n thought


    }
    • Moved by Harry Zhu Wednesday, December 9, 2009 3:43 AM (From:Visual C# General)
    Thursday, December 3, 2009 10:41 PM

Answers

  • I FEEL SORRY ABOUT THE COMMENT OF MR HARRY

    because i got solution from one of my friend today

    i can use cn.begintransaction,cn.commit,cn.rollback from c# itself

    so please think about ur self before moving topic

    if anybody need solution i can quote here

    by by

    • Marked as answer by hot n thought Thursday, December 10, 2009 9:33 PM
    Thursday, December 10, 2009 2:55 PM

All replies

  • Hi,

    The question relating to oracle is beyond the scope of c# forum .
    You might need to try oracle support.

    I'm moving the thread to off-topic forum.

    Thanks,
    Harry
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, December 9, 2009 3:42 AM
  • I FEEL SORRY ABOUT THE COMMENT OF MR HARRY

    because i got solution from one of my friend today

    i can use cn.begintransaction,cn.commit,cn.rollback from c# itself

    so please think about ur self before moving topic

    if anybody need solution i can quote here

    by by

    • Marked as answer by hot n thought Thursday, December 10, 2009 9:33 PM
    Thursday, December 10, 2009 2:55 PM
  • Hi,

    Glad to know you have found the answer!
    and I'm sorry about the inadequacy comment.
    I did not notice you are using OracleCommand Class.

    For question relating to using oracle client , you might want to try this forum:
    http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/threads

    Harry
    Friday, December 11, 2009 2:23 AM