Returns true or false if there is a open transaction.
1 connection.isOnTransaction
<connection.isOnTransaction />
Returns | |
---|---|
Type | Description |
Boolean | Returns true if there is a open transaction. |
Remarks
It is a xsql-script if the programmer do not manage the transactions, the system open it automatically with the first DML statement and closes at the end of the xsql-script. If the programmer manages them with the tag connection.begin this will be responsible for closing it when appropriate.
Example
Print in differents steps if it is a open transaction.
Copy
<xsql-script name='sample_dba'> <body> <println>FIRST CALL : <connection.isOnTransaction /></println> <table name='test_con'> <column name='codigo' type='char' size='12' /> </table> <connection.begin/> <println>SECOND CALL : <connection.isOnTransaction /></println> <insert table='test_con'> <column name='codigo'>A</column> </insert> <connection.commit/> <drop table='test_con' /> </body> </xsql-script>