At execution time, at some point in the SQL code, I want to issue some kind of directive telling SQL Anywhere to throw an exception if there is any attempt to issue a commit, either explicitly or as a side-effect of some other statement.
Then, at some later point in execution, I want to release the prohibition.
My immediate motivation is to use a large body of SQL code (procedures and what-not) in a transactional context, where the current code cares not one whit about transaction design. Hunting for the sassen-frassen-fricken-fracken commits is taking up too much of the my time, whereas an exception (or two, or ten) would make life easier.
My long-term motivation is to be able to exhort "No commits!" and know that the code (however badly maintained in the future) will either obey the exhortation or fail.
(I suppose I could move all the code into a CREATE TRIGGER... :)
Silent commits are deadly for data integrity.
So... can I do it now, or is it a product suggestion?
A few ideas - I'm not sure they fit your requirements:
answered 19 May '13, 17:33