Code example for PreparedStatement

Methods: clearBatch, executeBatch

0
			} 
 
		} 
 
		private void commit() throws SQLException { 
			prepStmt.executeBatch();
			prepStmt.clearBatch();
			atlasProgress.incMapCreationProgress(tileCounter);
			tileCounter = 0;
			conn.commit();
			System.gc();
		} 
 
		public void finalizeMap() throws IOException { 
			try { 
				commit(); 
			} catch (SQLException e) {
				throw new IOException(e);
			} 
		}