Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw explicit exception when trying to use batched execution with prepared statement with generated keys option [JDBC451] #491

Closed
firebird-automations opened this issue Sep 10, 2016 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Is related to JDBC452

Using batch execution with Statement.RETURN_GENERATED_KEYS (or one of the other generated keys options) in Jaybird 2.2 results in:

Exception in thread "main" java.sql.BatchUpdateException
at org.firebirdsql.jdbc.AbstractPreparedStatement.executeBatch(AbstractPreparedStatement.java:941)
at nl.lawinegevaar.fb.TestIdentityTable.main(TestIdentityTable.java:32)

We should throw an explicit exception that batch execution with generated keys is not supported (maybe already in addBatch()?)

Commits: 6b9c43c bdc6c4c

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Only fix in 2.2.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.12 [ 10781 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue is related to JDBC452 [ JDBC452 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Calls to addBatch() and executeBatch() on a FBPreparedStatement instance now throw a FBDriverNotCapableException when the statements was prepared with one of the generated keys options.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants