Hi .
I've developed a very simple stored procedure that writes in two database tables and depending on internal result, can rollback or commit the transaction.
The procedure works fine as the desired user from sql script Toad but when it is called from a web page the error returned is Insert User ORA-02074: cannot SET SAVEPOINT in a distributed transaction Code-2074.
I've read that to get around this problem i have to declare the stored procedure as pragma autonomous_transaction but it doesn't work well.
The client code uses the Enterprise Library for .NET Framework 2.0. The Oracle database is 8.1.7.3.

The S.P. code is like this:

create or replace procedure insert_into_t
as
pragma autonomous_transaction;

myCondition boolean ;
begin

SAVEPOINT A;

insert into t values ( 1 );

if myCondition then
commit;
else
rollback to A;
end if;
end;



Thanks - Davide.