ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Jtds & mssql 2012

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jtds & mssql 2012

    I am attempting to connect to an MSSQL 2012 database via jtds-1.3.0.

    I had already installed the JDBC service program that SK had posted on his site.

    I installed jtds-1.3.0.jar into folder /java/jdbc & have my classpath set accordingly.

    I kept getting error message "(net/sourceforge/jtds/jdbc/Driver) bad major version at offset=6" after the JVM started. The system wide default is jdk60 32-bit.

    After googling the error message, it appears that this error indicates that your projects were compiled with a higher level Java compiler than the runtime can support.

    So I logged off, logged back on, set my JVM to be jdk70 32-bit, and tried to run my sample program. Sure enough, that error didn't crop up (although I got other errors pertaining to SSO).

    I don't know if I feel comfortable changing my system-wide JDK from 1.6 to 1.7 at this point, and would rather not need to change the JAVA_HOME variable at program execution.

    Does anyone know if JTDS-1.3.0 can be compiled at level 1.6 (and if so, does anyone have a version that you could send me)?

    If not, do you know if any other versions of JTDS are compatible with MSSQL 2012 (and are compiled to work under JDK1.6)?

    Thanks

  • #2
    Re: Jtds & mssql 2012

    Update: I am able to connect to the MSSQL 2012 database using JTDS-1.2.7 & JDK 6.0 (1.6).

    I haven't gone any further yet (access/update data), so I'm still uncertain if the 1.2.7 driver will suit my needs.

    Comment


    • #3
      Re: Jtds & mssql 2012

      please keep us in the loop..
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: Jtds & mssql 2012

        Taken from the jTDS site:
        Version 1.3.0 is the first Java 7 compatible version of the driver and, beside the fix for bug #672, improves performance compared to version 1.2.7. The future development will be focused on the 1.3.x line of the driver, so further enhancements and bug fixes will not necessarily become available it the Java 1.3 compatible jTDS 1.2.x. You should only stick to jTDS 1.2 if you require to use a Java version prior to Java 7.
        The way I read it, you need Java 7 to use version 1.3.0. If you want to use an older Java, you need to use 1.2.7.

        Comment


        • #5
          Re: Jtds & mssql 2012

          After doing some application testing, it appears that setting the system-wide java version to 1.7 wouldn't have any adverse effects. So I did that, and am utilizing jtds-1.3.0.

          See this thread to see objective / code sample.

          Hope this helps others.

          Comment

          Working...
          X