Attempt 3 (and a half)... :-/ (final Dragon)
@@ -2597,12 +2597,10 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
++attempt;
try {
- /*
// Re-use handle if available, requires parameter definitions which are not available until here.
if (reuseCachedHandle(hasNewTypeDefinitions, false)) {
hasNewTypeDefinitions = false;
}
- */
if (numBatchesExecuted < numBatchesPrepared) {
// assert null != tdsWriter;
@@ -2673,10 +2671,10 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
// In batch execution, we have a special update count
// to indicate that no information was returned
batchCommand.updateCounts[numBatchesExecuted] = (-1 == updateCount) ? Statement.SUCCESS_NO_INFO : updateCount;
+ processBatch();
+
if(1 == attempt)
numBatchesExecuted++;
-
- processBatch();
}
if(retry)
continue;
