I am new to java. I am trying to create program to throw value to ResultSet in different thread.
ResultSet rset = stmt
.executeQuery("select DISTINCT substr(file_type,1,3) from DBM.file_table where process_time= '0015' ");
while (rset.next()){
r = rset.getString(1);
System.out.println(r);
Now suppose we get 5 different value from ResultSet. What i wanna do is to run below code for all value of ResultSet synchronized in different Thread.
String spCall = "call DBM.SP_MS_" + r + "('0015', NULL, SYSDATE, 'DBM')";
try {
dbConnection = getDBConnection();
stmt1 = dbConnection.createStatement();
System.out.println(spCall);
stmt1.executeUpdate(spCall);
System.out.println("SUCCESS for File_Type " + r );
System.out.println("-----------------------------");
} catch (SQLException e) {
System.out.println(spCall);
stmt1.executeUpdate(spCall);
System.out.println("SUCCESS for File_Type " + r );
System.out.println("-----------------------------");
} catch (SQLException e) {
Thanks