SQL2K中SQL语句执行异常?
在ORA下可以正常运行的Select查询,改成SQL2K成之后怎么就不行了呢???
java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]
Invalid operation for the current cursor position.
部分程序如下:
Statement stmt;
stmt=con.createStatement();
String sql="select rolename from userinfo where username='"+userName+"' and password='"+password+"'";
ResultSet rs=stmt.executeQuery(sql);