try{
dbTools = new DBTools();
ResultSet chainRS=dbTools.getResultSet(getChainSql);
while(chainRS.next()){
iChainId = chainRS.getInt("chain_id");
sSourceCol = chainRS.getString("source_col");
sSourceColType = chainRS.getString("source_col_type");
sAimCol = chainRS.getString("aim_col");
sAimColType = chainRS.getString("aim_col_type");
//把数据链信息放入容器
if(chainRS.isLast()){
tempSelect = tempSelect+" "+sSourceCol; }
else{
tempSelect = tempSelect+" , "+sSourceCol;
}
}
catch(Exception e){
return -1;
}
dbTools = new DBTools();
ResultSet chainRS=dbTools.getResultSet(getChainSql);
while(chainRS.next()){
iChainId = chainRS.getInt("chain_id");
sSourceCol = chainRS.getString("source_col");
sSourceColType = chainRS.getString("source_col_type");
sAimCol = chainRS.getString("aim_col");
sAimColType = chainRS.getString("aim_col_type");
//把数据链信息放入容器
if(chainRS.isLast()){
tempSelect = tempSelect+" "+sSourceCol; }
else{
tempSelect = tempSelect+" , "+sSourceCol;
}
}
catch(Exception e){
return -1;
}
解决方案 »
- ajax同时加载冲突问题~
- 要用JSP制作一个博客站点,请问怎么实现给每个注册用户分配各自的页面?
- 刚学jsp的菜鸟求教
- ▆▆▆▆▆▆ Jpager 问题 ▆▆▆▆▆▆
- 求一电子书原代码《jsp信息体统设计与开发实利》
- Build path entry is missing: frameworkv2.00.006
- TomCat4.1.3端口绑定问题
- 在JFrame中画的图如何放到jsp页面中,请指教,谢谢!!! 急!
- java项目启动Tomcat报错!!!
- request.getSession.getServletContext.getcontextPath的问题
- 为什么用ODBC测试都通不过?
- 在线提问简单问题~~急!关于传参数
int resultSetConcurrency)
throws SQLException
Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and concurrency to be overridden. Parameters:
resultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
Returns:
a new Statement object that will generate ResultSet objects with the given type and concurrency
Throws:
SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type and concurrency
Since:
1.2
要使ResultSet可以滚动,必须得到Statement设定参数
DBTools()是我自己写的操作数据库的n个方法
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery(sql);