public Statement createStatement(int resultSetType, int resultSetConcurrency)throws SQLExceptionCreates Parameters:resultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE Returns:a new Statement objec构造时选择合适的参数,即可实现rs.previsous.
OK,I got it! These messages are important for me! Thanks a lot for you all!
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
createStatement只能带两个参数或者三个或者一个都不带,上面的方法可以让你在程序中使用
以下形式:
ResultSet rs = null;
然后 就可以使用 rs.first() rs.last() 等等了。
希望能够帮上你。
int resultSetConcurrency)throws SQLExceptionCreates Parameters:resultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE Returns:a new Statement objec构造时选择合适的参数,即可实现rs.previsous.
These messages are important for me!
Thanks a lot for you all!