java - Store csv file data to MS Access Database with specific fields -


i have many files huge data. want store data ms access database based on fields mentioned in csv file. same fields data stored in database (i have 4 fields in database , same in csv field data going store in database using java).

enter image description here

in above image have 4 fields huge data. have created 4 fields in ms access database. in created fields want insert data according fields in ms access database.

i need java programming code achieve this.

like parfait said in comment "so not code-writing service" because novice in reading csv file using opencsv lib ( use version 3.8 of lib java 8) storage in acces data base must googling

import java.io.filereader; import java.io.ioexception;  import com.opencsv.csvreader;   public class readcsv {       public static void main(string[] args) throws ioexception {         // separator ;         csvreader reader = new csvreader(new filereader("test.csv"),';');         string [] nextline;         while ((nextline = reader.readnext()) != null) {             // nextline[] array of values line             system.out.println(nextline[0] +" "+nextline[1]+" "+nextline[2]+" "+nextline[3] );          }     }  } 

ps: tested code test.csv , separator ;


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -