Returns true or false indicating if the database supports transactions.
 

1 connection.supportsTransactions

<connection.supportsTransactions />

Returns

boolean: True if the database supports transactions and false otherwise.

Remarks

This function allows the programmer to avoid executing operations in the database when they can not be performed if it do not support transactions.

Example

Avoid realize a deferred of constraints if the database do not support transactions.

Copy
<xsql-script name='sample_connection_supportsTransactions'>
  <body>
    <connection name='wic_misc'>    
      <println>The database supports transactions: <connection.supportsTransactions /></println>  
      <if>
        <expr><connection.supportsTransactions /><expr>
        <then>
          <deferred-constraint name='u_wic_jrep_form_butt_field' />
        </then>
      </if>        	
    </connection>        
  </body>
</xsql-script>