11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Return Values<br />

The following table describes the return values for the<br />

SQLSetConnectOption.<br />

Private Transactions<br />

SQL.PRIVATE.TX.ON frees the connection from being managed by the UniData<br />

transaction manager. When you make a connection private, the application can use<br />

the SQL.AUTOCOMMIT option to put the connection into either autocommit mode<br />

or manual commit mode. By default, private connections are in autocommit mode, in<br />

which each SQL statement is treated as a separate transaction, committed after the<br />

statement is executed.<br />

In manual commit mode the application can do either of the following:<br />

1-848 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

Return Value Description<br />

0 SQL.SUCCESS<br />

−1 SQL.ERROR<br />

−2 SQL.INVALID.HANDLE<br />

SQLSetConnectOption Return Values<br />

Use the SQLTransact function to commit or roll back changes to the<br />

database.<br />

Set the SQL.AUTOCOMMIT option of SQLSetConnectOption to<br />

SQL.AUTOCOMMIT.ON. This commits any outstanding transactions and<br />

returns the connection to autocommit mode.<br />

You must return the connection to autocommit mode before using SQLDisconnect<br />

to close the connection. You can do this in two ways:<br />

Set the SQL.AUTOCOMMIT option of SQLSetConnectOption to<br />

SQL.AUTOCOMMIT.ON<br />

Set the SQL.PRIVATE.TX option of SQLSetConnectOption to<br />

SQL.PRIVATE.TX.OFF

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!