"Ed Prochak" <edprochak_at_gmail.com> wrote in message
news:1170857884.565184.278500_at_k78g2000cwa.googlegroups.com...
> On Feb 5, 5:09 pm, "Mike Ross" <m..._at_perq.com> wrote:
>> "Valentin Minzatu" <valentinminz..._at_yahoo.com> wrote in message
>>
>> news:1170712850.520519.190770_at_l53g2000cwa.googlegroups.com...
>>
>>
>>
>>
>>
>> > On Feb 5, 4:14 pm, "Mike Ross" <m..._at_perq.com> wrote:
>> >> I have been migrating my company's application to an Oracle 10g
>> >> database,
>> >> and I have run into a strange problem:
>>
>> >> I begin a transaction, execute several SQL insert and update
>> >> statements,
>> >> then call a Stored Procedure that does a table insert, then I do a
>> >> couple
>> >> more SQL insert statements, and then I rollback the transaction. All
>> >> of
>> >> the
>> >> activity is rolled back - EXCEPT the insert that happened in the
>> >> Stored
>> >> Procedure - that activity remains in the database. The Stored Proc is
>> >> very
>> >> simple - it just inserts a row into a table, and it doesn't declare
>> >> any
>> >> of
>> >> its own transactions or anythign like that.
>>
>> >> I am using Microsoft Visual Studio 2005 and ADO.NET to do this, using
>> >> OracleCommand and OracleTransaction objects, calling
>> >> OracleCommand.ExecuteNonQuery to submit the commands to Oracle.
>>
>> >> Can anybody help me understand why the Stored Procedure activity is
>> >> NOT
>> >> getting rolled back?
>>
>> > Maybe because you call the SP in auto-commit mode? I am not even
>> > familiar with ADO .NET techonology, but given that there is no
>> > explicit commit in your stored procedure that's what I would next look
>> > at.
>>
>> I'm not explicitly setting an auto-commit mode. Is it set on by default
>> in
>> stored procs?- Hide quoted text -
>>
>> - Show quoted text -
>
> to rephrase what Valentin said:
> Is autocommit mode set ON in .NET/ADO???
Right, I suppose that's a good question to ask as well.
Anyway, I left the procedures that looked like they were supposed to work
but didn't work, and I re-started everything - even rebooted the computer,
and everything seems to be working as expected now. I don't know what the
problem was, exactly - maybe something stuck in a cache somewhere - but
through some sort of magic, it seems to be working now and I'm not going to
question it.
Thanks for your help
Received on Wed Feb 07 2007 - 12:42:42 CST