Home | Previous Page | Next Page   Performing Database Operations > Updating the Database >

Performing Batch Updates

The batch update feature is similar to multiple Informix SQL PREPARE statements. You can issue batch update statements as in the following example:

PREPARE stmt FROM "insert into tab values (1); 
   insert into tab values (2);
   update table tab set col = 3 where col = 2";

The batch update feature in IBM Informix JDBC Driver follows the Sun Microsystems JDBC 3.0 specification, with these exceptions:

The following sections give details.

SQL Statements and Batch Updates

The following commands cannot be put into multistatement PREPARE statements:

For more details, refer to IBM Informix: Guide to SQL Syntax.

Return Value from Statement.executeBatch() Method

The return value differs from the Sun Microsystems JDBC 3.0 specification in the following ways:

The BatchUpdate.java example file shows how to send batch updates to the database server.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]