You are doing it wrong! With your current code, you will get the missing alternate lines as you call readLine() twice, but only print it for the first time.
In addition, if you want to insert multiple rows into your database, you should look at Batch .
Here is the JAVA Doc addBatch() :
Adds this SQL command to the current command list for this Statement object. The commands in this list can be executed as a package by calling the executeBatch method.
You should do something like this:
String input = null; while ((input = s.readLine()) != null) { stmt.addBatch(input); }
Here is how you can execute the package:
int[] result = stmt.executeBatch();
source share