Hi,
(V8.1 Fp2)
Our application uses JDBC batch to execute mutiple insert statements
and we saw a strange thing this morning.
There were 4 SQL Insert statements in the batch, and we know the 2nd
would have
violated a Unique Constraint and failed, but the SQL error returned
was related to the 3rd statement (which had a FK dependent on the 2nd
statement).
This has raised some fundamental questions about DB2 JDBC Dtriver
batch processing.
1. Is it possible the 3rd statement was executed before the 2nd
statement?
2. Do we 'Have' to include BEGIN ATOMIC in the batch statements ?
3. Is there some other explanation why we saw the 3rd statement error
returned
and not the 2nd statement?
Any insight/pointers on this or more generally using JDBC batch
greatly
appreciated.
Paul.
(V8.1 Fp2)
Our application uses JDBC batch to execute mutiple insert statements
and we saw a strange thing this morning.
There were 4 SQL Insert statements in the batch, and we know the 2nd
would have
violated a Unique Constraint and failed, but the SQL error returned
was related to the 3rd statement (which had a FK dependent on the 2nd
statement).
This has raised some fundamental questions about DB2 JDBC Dtriver
batch processing.
1. Is it possible the 3rd statement was executed before the 2nd
statement?
2. Do we 'Have' to include BEGIN ATOMIC in the batch statements ?
3. Is there some other explanation why we saw the 3rd statement error
returned
and not the 2nd statement?
Any insight/pointers on this or more generally using JDBC batch
greatly
appreciated.
Paul.
Comment