nidr 发表于 2016-11-5 04:41:20

hibernate 2.0 + ms sql server 2000 的ResultSet问题

hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433/strongipp;SelectMethod=cursor
hibernate.connection.username=sa
hibernate.connection.password=sa
hibernate.show_sql=true


<prop key="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</prop>


出错:ResultSet may only be accessed in a forward direction
原因是:光标不能往回移动。

jdbc访问模式的解决方法是:
connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

请问,SSH框架下怎么解决?
页: [1]
查看完整版本: hibernate 2.0 + ms sql server 2000 的ResultSet问题