Why do my transactions fail when I invoke executeUpdate()? I've set autocommit to false, but I get the SQLException: "The file is not valid for the operation" and getTransactionIsolation() returns TRANSACTION_UNCOMMITED.

Joe Sam Shirah

Transactions require underlying support. In general, there must be

1) A database table.

2) The database must support transactions.

3) Any setup required by the specific database to allow transactions must be performed.

For example, the AS/400 supports transactions via a process called journaling. Journals must be specifically created and operational or SQL Collections, rather than standard libraries, must be created for automatic journals.

To check whether transactions are valid, use DatabaseMetaData.supportsTransactions().

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact