Micorosoft SQL Server JDBC 3.0 Released!!!

Micorosoft SQL Server JDBC 3.0 Released!!!

  • Comments 21

Dear SQL Server developers and users:

 

On behalf of Microsoft SQL Server JDBC team I am very excited to announce our latest JDBC driver Microsoft SQL Server JDBC 3.0 release.

 

This version of the JDBC driver provides support for features introduced in SQL Server 2008, which includes date and time data types, sparse columns, MERGE statements and large user-defined types (UDTs). The support for the new date and time data types includes new setter, getter, and updater methods for SQL Server time, date, datetime2 and datetimeoffset data types. Support for large UDTs includes handling CLR UDTs that are larger than 8000 bytes as binary data. Also, this release adds interfaces for unwrap and isWrapper in the Wrapper interface. In addition, this release enhances metadata support by adding sparse column metadata and new date and time metadata.

 

Thank you for providing great feedback on our CTP. We really appreciate your continued support on our driver. Feel free to download a copy and check it out!

 

Thank you,

Amina Saify - JDBC

Leave a Comment
  • Please add 6 and 6 and type the answer here:
  • Post
  • Hi

    Nice release!! Any plans to support TVPs from JDBC ?

    BR

    Hans

  • We are using MS-JDBC v3.0 against SQL 2008 but getting the following error from java/hibernate:

    2010-08-11 19:35:35,193 DEBUG [com.example.test.Test] - No Dialect mapping for JDBC type: -9

    org.hibernate.MappingException: No Dialect mapping for JDBC type: -9

    at org.hibernate.dialect.TypeNames.get(TypeNames.java:79)

    at org.hibernate.dialect.TypeNames.get(TypeNames.java:104)

    at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:393)

    at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:582)

    .

    .

    .

    The only work around we find is to provide a custom extension of the sqlDialect. Is this really needed ?

  • Any ideas whent TVP will be suported?

  • like other notorious MS software, the driver just issue "Specified driver could not be loaded due to system error  1114", what the heck is that?

  • How about a UDT example?  I can't seem to find any documentation on how to use it.

  • Standalone java TestCase:

    import java.sql.*;

    public class TestCase {

    public static void main(String args[]) {

    try {

    // Step 1: Load the JDBC driver.

    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // Microsoft driver

    // Step 2: Establish the connection to the database.

    String url = "jdbc:ibm:sqlserver://localhost:1433;databaseName=MYDB;";

    Connection conn = DriverManager.getConnection(url,"user","password");  

    // MetaData info for debug

    DatabaseMetaData meta=conn.getMetaData();

    System.out.println("Driver Name="+meta.getDriverName());

    System.out.println("Driver Version="+meta.getDriverVersion());

    System.out.println("JDBC Major Version="+meta.getJDBCMajorVersion());

    System.out.println("getSchema()");

    ResultSet schema=meta.getSchemas();

    while(schema.next()){

    System.out.println(schema.getString(1));

    }

    System.out.println("got the schema -done");

    System.out.println("WORKED FINE");

    }// end try

    catch (SQLException sqe) {

    System.out.println(sqe.getMessage());

    System.out.println("SQLState="+sqe.getSQLState());

    System.out.println("SQL Error Code ="+sqe.getErrorCode());

    sqe.printStackTrace();

    System.exit(1);

    }// end catch

    catch (Exception e) {

    e.printStackTrace();

    System.exit(1);

    }// end catch

    System.exit(0);

    }

    }

    Produces this output:

    Output:

    Driver Name=Microsoft SQL Server JDBC Driver 3.0

    Driver Version=3.0.1301.101

    JDBC Major Version=4

    getSchema()

    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CS_AS" in the INTERSECT operation.

    SQLState=S0009

    SQL Error Code =468

    com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CS_AS" in the INTERSECT operation.

    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)

    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)

    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:775)

    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:676)

    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)

    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)

    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)

    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)

    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQueryInternal(SQLServerStatement.java:619)

    at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSetFromInternalQueries(SQLServerDatabaseMetaData.java:224)

    at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getSchemasInternal(SQLServerDatabaseMetaData.java:1292)

    at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getSchemas(SQLServerDatabaseMetaData.java:1227)

    at TestCase.main(TestCase.java:22)

    This works fine with version 2.0 of the JDBC driver.

    The server collation is set to Latin1_General_CI_AS, whereas the database collation is set to SQL_Latin1_General_CP1_CS_AS

    Is this a deliberate limitation or a bug - an d is there any way around it without changing either the server or database collation?

Page 2 of 2 (21 items) 12