You don't need both the for and while loops. I think you're trying to limit the number of updates to 18 per statement in load_db, but this won't work.
Instead, create a two-dimensional array with 18 rows and 4 columns(number of fields in CSV line).
Also, when we reach the last CSV line in br, i may be less than 18, so you need to execute db_load on the content of csv_data after exiting the read loop.
final int MAX_ROWS = 18;
final int CSV_FIELDS = 4;
int i=0;
String[][] csv_data = new String[MAX_ROWS][CSV_FIELDS];
while ((line = br.readLine()) != null) {
// use comma as separator
csv_data[i++] = line.split(csvSplitBy);
if (i == 18) {
db_loader(csv_data);
i=0;
}
}
if(i>0) db_loader(csv_data);