IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > JDBC > Overview of IBM WebSphere Adapter for JDBC > Technical overview

Batch SQL business object overview

A batch SQL business object runs one or more user-defined INSERT, UPDATE, and DELETE statements and returns the status of the statements.

The external service wizard helps you build batch SQL business objects that run a set of user-defined INSERT, UPDATE, and DELETE statements against the database. You specify the statements, using ? (the question mark) in place of any substitutable parameters in the statements. The wizard then provides an area where you specify the data type of each parameter and provide a sample value. The wizard uses the sample values when you validate the business object before saving the configuration.

The batch SQL statement does not support dynamic WHERE clauses for UPDATE and DELETE statements. The adapter does accept complex statements, such as JOIN or SUBSELECT, although the adapter does not parse these statements.

If the batch SQL business object contains a single INSERT statement, it can retrieve an automatically generated ID or identity value for the inserted rows.

Each SQL statement in the business object returns a status value, which is placed in an attribute named Statement NStatus.

For example, the status of the first SQL statement in a business object is in Statement1Status; the status of the second statement is in Statement2Status, and so on.

If a single INSERT statement fails, the adapter generates the exception. If one of the statements in a batch UPDATE fails to run properly, the JDBC driver generates the java.sql.BatchUpdateException. When this exception is generated, the adapter rolls back the transaction so that none of the SQL statements are committed to the database.

In case of any failure in one or more Batch SQL queries an error is not displayed, as the Oracle database does not specify the correct state for each SQL statement in a batch. This is the default design behavior of Oracle.

Technical overview