一个数据库操作完成,为什么下一个数据库操作不能进行,抛异常???像下面这样:
String sql,sql2;conn = cdb.getConn() ;conn.setAutoCommit(false) ;pstmt = conn.prepareStatement(sql);
pstmt.setString(1, role.getName()) ;
pstmt.setString(2, role.getDescription()) ;
pstmt.executeUpdate() ;  //刷新操作;System.out.println("hhhhhhhhhhhh");
rs = conn.prepareStatement(sql2).executeQuery() ;    //查询操作;
System.out.println("aaaaaaaaaaaa");
问题:
rs = conn.prepareStatement(sql2).executeQuery() ;不能执行,抛异常;