3 Replies Latest reply on Mar 4, 2003 11:14 AM by Michael J. Bergin

    SQL Server Exceptions ...

    Rob Kesik Newbie

      Grettings ,

      I have installed JBOSS 3.0.4 and am attempting to connection pool using MS SQL Server 2000. I have setup the mssql-service.xml file and placed it into the deploy directory, placed the jars into the lib directory (both of them just to be sure) and I have changed both the standardjboss.xml and standardjaws.xml . Everything appears to be ok because I can do a lookup on the datasource and create a connection no problems.

      When I attempt the run the following code in one of the entity ejbs :

      try {
      InitialContext initCtx = new InitialContext();
      Connection conn = null;
      DataSource ds = (javax.sql.DataSource)initCtx.lookup ("java:/MSSQLDS");
      conn = ds.getConnection();
      Statement stmt = conn.createStatement();
      //ResultSet set = stmt.executeQuery("select count from QTracsCount");
      stmt.execute("Select * from QTracsHolder");
      ResultSet set = stmt.getResultSet();
      System.out.println (set.getRow());
      System.out.println (set.getString(1));

      } catch (Exception e) {

      I get the following output :
      "Can't start a cloned connection while in manual transaction mode"

      Obviously the code is bombing out at set.getString call. Several websites suggested that I add ";SelectMethod=cursor" to my connection url, which I did. I then got the following output while running the above code :

      "Invalid operation for the current cursor position"

      Ugh! Any ideas guys? Thanks.