I have a scenario where a loop creates statement Object using con.createStatement() , morethan 500 times. The database we used is Oracle.
In the result set, I was getting only for initial 500 queries, remaining was null.
Refactored the code to PreparedStatement, It worked for n number of queries in the same connection Object.
I am not sure 500 is the Limit from JDBC or the Oracle side.
But it is sure that there is a limit for it.