String sql = "SELECT 1 AS T Union SELECT 2 AS T Union SELECT 3 AS T \n";
sql += "Union SELECT 4 AS T Union SELECT 5 AS T Union SELECT 6 AS T\n";
sql += "Union SELECT 4 AS T Union SELECT 5 AS T Union SELECT 6 AS T\n";
.....Same Statement....
sql += "Union SELECT 4 AS T Union SELECT 5 AS T Union SELECT 6 AS T\n";
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String connStr = "jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=DBName;User=UserName;Password=Pwd;";
Connection con = DriverManager.getConnection(connStr);
Statement smt = con.createStatement();
ResultSet rst = smt.executeQuery(sql);
rst.close(); smt.close(); con.close();
答案 0 :(得分:1)
将驱动程序升级到SQL Server JDBC驱动程序版本6.2.2
问题解决了。
谢谢你的帮助。