[quote]Originally posted by sergiosette:

Why cannot the InTransaction be a simple flag handled by the session component ?

[/quote]For very obvious reason - session component can't be awareabout transaction state of database session. Imagine, for example, a call to stored procedure that performs commit (or rollback) inside procedure code or perform dynamic DDL (and each DDL statement commit twice).

So if you know which activity your application perform, you may monitor flag himself. If know, then you shall ask the database (that session component do for you).