I'm trying to execute the following code
PreparedStatement ps = con.prepareStatement(sqlBlock);
done = ps.execute();
where done is of type boolean and sqlBlock contains the tsql script. As long as the tsql script contains only set/select/declare statements, done returns true.
But when the tsql script has any if/while/create/print statements, done is false and there's no resultset returned even if there are select statements in the script.