去hibernate中文论坛.那里才是讨论hibernate的地方

解决方案 »

  1.   

    SectionDevice d=new SectionDevice();
    d.setName("电脑1");
    d.setModel("1-2");
    d.setRegDate(java.sql.Date.valueOf("2002-02-01"));Transaction tx = null;
            try {
                tx = session.beginTransaction();            session.save(d);            session.flush();
                tx.commit();
            }
            catch (Exception e) {
                if (tx != null)
                    tx.rollback();
                throw e;
            }
            finally {
                session.close();
            }
      

  2.   

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a
    cloned connection while in manual transaction mode.
    按上面给的代码,还是出这样的异常。
      

  3.   

    jdbc:microsoft:sqlserver://XXX:1433;DatabaseName=XXX;SelectMethod=cursor
      

  4.   

    2003-12-18 11:23:23 net.sf.hibernate.transaction.JDBCTransaction begin
    严重: Begin failed
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Socket closed
      

  5.   

    对不起,刚才我按你的意思改过后,没重启服务,现在解决了,不再报异常了,谢谢miwoo.能不能给我说说selectMethod=cursor是什么意思。为什么不用它会出这样的错。
      

  6.   

    我是刚来csdn不久,如何给分 这儿。