From a385153e8c2b3d41bc7cfdb7f869f076329ab9bb Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 7 Dec 2015 21:04:11 +0100 Subject: [PATCH] StatementCreatorUtils detects Microsoft SQL Server driver 4.0 as well Issue: SPR-13772 (cherry picked from commit c2fed6e) --- .../org/springframework/jdbc/core/StatementCreatorUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java index b805724ddd0..123e7e2540e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -281,7 +281,8 @@ public abstract class StatementCreatorUtils { } String databaseProductName = dbmd.getDatabaseProductName(); if (databaseProductName.startsWith("Informix") || - jdbcDriverName.startsWith("Microsoft SQL Server")) { + (jdbcDriverName.startsWith("Microsoft") && jdbcDriverName.contains("SQL Server"))) { + // "Microsoft SQL Server JDBC Driver 3.0" versus "Microsoft JDBC Driver 4.0 for SQL Server" useSetObject = true; } else if (databaseProductName.startsWith("DB2") ||