In Sybase server-side language how can my code test whether it's running in chained or unchained (auto-commit) mode?
Examining the status of
@@TRANCOUNT is not really conclusive.
I gather that there must be a way as for instance, JDBC provides getAutoCommit which is able to detect whether the connection is in auto-commit (unchained) mode or not. But how do I do that from within a stored procedure?
I've found this question but it seems to answer for SQL Server only.