"Anhaus, Thomas" wrote:
> 
> ...
> >> Note : The <commit statement> and <rollback statement> are NOT permitted
> in
> >> a
> >>        stored procedure.

> ...
> IMO every stored procedure therefore should open a subtransaction which is
> ended successfully only if no unexpected error occurs.
> Otherwise the subtransaction should be rolled back :
> 
> CREATE DBPROC EXAMPLE AS ...
> SUBTRANS BEGIN;
> ...
> IF no_error
> THEN
>   SUBTRANS END
> ELSE
>   SUBTRANS ROLLBACK;

I could not agree more, but I must confess I find myself bedazzled :-).
For me a subtransaction is a nested transaction, which is a transaction
like any other albeit smaller <g>.

Yet the (way) above can only make sense if subtransactions are not
transactions as such for then there could be no rollback in a stored
proc. But then if they are not transactions how, if at all, can
they provide for atomicity? Yet if they do that implies that rollback
is allowed in a stored proc. Which begs the question that since not
all transactions seem to've been created equal, what about atomicity?
Are some atoms more, ehm, "atomier" than others? Protons, muons,...?

I must be missing something here and though I think I've got an
inkling what, namely a semantic interpretation, ... ?

I have the feeling someone went overboard in trying to prevent
confusement over scope. But that's just me ;).

Roelof

-- 
_______________________________________________________________________
eBOA�                                               est. 1982
http://eBOA.com/                                    tel. +31-58-2123014
mailto:[EMAIL PROTECTED]?subject=Information_request    fax. +31-58-2160293
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to