ceving
ceving

Reputation: 23856

What happens when a JDBC database number exceeds Java's int size during ResultSet.getInt?

I am search for the documentation which specifies what happens if I call getInt on a JDBC result set for a column containing a value which does not fit into an integer. The documentation for getInt does not specify this. Can anybody give me a hint?

Upvotes: 3

Views: 472

Answers (1)

Peter Lawrey
Peter Lawrey

Reputation: 533530

In most cases getInt() for a Number which is too large will overflow. I suggest you test this yourself as the behaviour is likely to be specific to the JDBC driver you are using.

Upvotes: 2

Related Questions