createStatement(int resultSetType,int resultSetConcurrency)
prepareStatement(String Sql,int resultSetType,int resultSetConcurrency)
resultSetType:结果集类型
可取值:
1.ResultSet.TYPE_FORWORD_ONLY,结果集只可向前滚动;
2.ResultSet.TYPE_SCROLL_INSENSITIVE,双向滚动,但不及时更新,就是如果数据库里的数据修改过,并不在ResultSet中反应出来。
3.ResultSet.TYPE_SCROLL_SENSITIVE,双向滚动,并及时跟踪数据库的更新,以便更改ResultSet中的数据。
resultSetConcurrency:结果集可进行的操作
可取值:
1.ResultSet.CONCUR_READ_ONLY 只读
2.ResultSet.CONCUR_UPDATABLE 可修改