Search in sources :

Example 1 with SQLServerCallableStatement42

use of com.microsoft.sqlserver.jdbc.SQLServerCallableStatement42 in project mssql-jdbc by Microsoft.

the class Wrapper42Test method CallableStatement42Test.

/**
 * Tests creation of SQLServerCallableStatement42 object
 *
 * @throws SQLException
 */
@Test
public void CallableStatement42Test() throws SQLException {
    String sql = "SELECT SUSER_SNAME()";
    CallableStatement cstmt = connection.prepareCall(sql);
    if (1.8d <= javaVersion && 4 == major && 2 == minor) {
        assertTrue(cstmt instanceof SQLServerCallableStatement42);
    } else {
        assertTrue(cstmt instanceof SQLServerCallableStatement);
    }
}
Also used : SQLServerCallableStatement42(com.microsoft.sqlserver.jdbc.SQLServerCallableStatement42) SQLServerCallableStatement(com.microsoft.sqlserver.jdbc.SQLServerCallableStatement) SQLServerCallableStatement(com.microsoft.sqlserver.jdbc.SQLServerCallableStatement) CallableStatement(java.sql.CallableStatement) Test(org.junit.jupiter.api.Test) AbstractTest(com.microsoft.sqlserver.testframework.AbstractTest)

Aggregations

SQLServerCallableStatement (com.microsoft.sqlserver.jdbc.SQLServerCallableStatement)1 SQLServerCallableStatement42 (com.microsoft.sqlserver.jdbc.SQLServerCallableStatement42)1 AbstractTest (com.microsoft.sqlserver.testframework.AbstractTest)1 CallableStatement (java.sql.CallableStatement)1 Test (org.junit.jupiter.api.Test)1