My Oracle Support Banner

Issue With ClearBatch() API Method of Oracle JDBC Driver (Doc ID 3005842.1)

Last updated on FEBRUARY 21, 2024

Applies to:

JDBC - Version 19.0.0.1 and later
Information in this document applies to any platform.

Goal

How API Method (PreparedStatement.clearBatch) of Oracle Driver behavior and works ?

About Clearing the Batch
 

A clearBatch or executeBatch call resets the statement batch to empty.

clearBatch - it should clear reset only statements which are added via .addBatch().

However, it clears the other values from the PreparedStatement

Example:

As per the above code, .clearBatch- it should clear reset only statements which are added via .addBatch().
However, it clears data which was added in line no, 9 and 10 as well.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.