<<

Contents

Search

>>

 

JDBC_SET_AUTOCOMMIT

 

 

Function

 

 

Syntax:

JDBC_SET_AUTOCOMMIT(<File Number>,<Mode>) or

JDBC_SET_AUTOCOMMIT(<Name of Index File>,<Mode>)

 

<File Number>

= <NUM-EXPRESSION>

<Name of Index File>

= <INDEX FILE NAME>

<Mode>

= <NUM-EXPRESSION>

 

 

Meaning:

Turns on/off the Autocommit mode.

 

If Autocommit mode is turned off a new transaction is started. The transaction finishes when JDBC_SET_AUTOCOMMIT is called again or JDBC_COMMIT or JDBC_ROLLBACK is called.

 

JDBC_SET_AUTOCOMMIT returns the result 0 if no error occurred, otherwise –1.

 

If an error occurs, the variable OK contains the error number and the function JDBC_GET_LAST_ERROR$ returns the error text.

 

Parameter:

File Number

Number of JDBC database

 

Name of Index File

Name of Index File

 

Mode

0: The Autocommit mode for the database <File number> is turned off. A new transaction is started.

<> 0: The Autocommit mode for the database <File number> is turned on.

 

Sample:

H% = JDBC_SET_AUTOCOMMIT(2,1)

IF H% = -1

THEN ERRORMES = JDBC_GET_LAST_ERROR$

ENDIF

 

See also:

JDBC_COMMIT

JDBC_ROLLBACK