访问数据库的一个奇怪问题
ace62 2008-11-20 01:17:09 我新近遇到一个问题,很奇怪,请各位大侠帮我看看
有一个数据表,用基本一样的二个SQL语句查询时,一个得到正确结果,一个出现错误:
java.sql.SQLException: Invalid state, the ResultSet object is closed.
at net.sourceforge.jtds.jdbc.JtdsResultSet.checkOpen(JtdsResultSet.java:299)
at net.sourceforge.jtds.jdbc.JtdsResultSet.next(JtdsResultSet.java:569)
用的数据库是MS SQL Server,JDBC是Jtds
执行
select * from Employee where stage='2' and id=1 order by type
时能得到正确结果,而执行
select * from Employee where stage='3' and id=1 order by type
时,却出现上面的错误
实在是郁闷啦