Topic: SQL EXCEPTION问题

  Print this page

1.SQL EXCEPTION问题 Copy to clipboard
Posted by: jayjyy
Posted on: 2006-03-19 10:06

我检查了一遍都没有什么错误,执行时有例外发生.以下是主要模块(i上面已声明):

try{
rs.beforeFirst();
while(rs.next())
{
xuehao=rs.getString(1);name=rs.getString(2);sex=rs.getString(3);
banji=rs.getString(4);address=rs.getString(5);
a[i][0]=xuehao;
a[i][1]=name;
a[i][2]=sex;
a[i][3]=banji;
a[i][4]=address;
i++;
pbar.setValue(i);
pbar.setString("查询了"+i+"条记录");
}
}
catch(SQLException sqlerror)
{
sqlerror.printStackTrace();
}


2.Re:SQL EXCEPTION问题 [Re: jayjyy] Copy to clipboard
Posted by: why
Posted on: 2006-03-27 02:43

As the exception message suggested, you could not use beforeFirst() with the TYPE_FORWARD_ONLY cursor type, try TYPE_SCROLL_INSENSITIVE


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923