Advertisement
Guest User

Untitled

a guest
Feb 6th, 2015
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. public static void performBatch(Connection conn, String path)
  2.     {
  3.        
  4.             String sautDeLigne = ";";
  5.         try (final Reader reader = Files.newBufferedReader(Paths.get(path), StandardCharsets.UTF_8);
  6.                      final Statement stmt = conn.createStatement()) { // Java 7+8
  7.                   for (String str = null; (str = in.readLine()) != null; ) {
  8.             stmt.execute(str);         
  9.           }
  10.         }
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement