title: javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]End of stream was detected on a read
body: <pre><code>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();
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/xQr6W.jpg" alt="Error"></p>