My code performs separation of "S12T00832B86*N1C0~S12*T0*0832*B*86*N1C0~"...Next i need to separate data between the "*" and utimately insert it into the database(ms-Access).i would like to recieve some code lines for that. Basically now the entire string i.e"**S12*T0*0832*B*86*N1C0" is being inserted into a column.i need to insert "S12" "T0" etc into separate columns.
public static void main(String[] args) throws IOException {
String token1 = "";// create token1 (deceleration only)
List<String> temps = new ArrayList<String>();// Array Deceleration only
@SuppressWarnings("resource")
Scanner inFile1 = new Scanner(new File("2.txt")).useDelimiter("~");//reading text data separated by (~)
while (inFile1.hasNext()) {// while loop
token1 = inFile1.next();// find next line in inFile1
temps.add(token1);
}
inFile1.close();
String[] tempsArray = temps.toArray(new String[0]);