1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| public void recupListJOBFrom_Oracle_2(Connection cnx)throws SQLException
{
try {
Statement st = cnx.createStatement();
Statement st2 = cnx.createStatement();
PreparedStatement pstmt_sybase;
pstmt_sybase=cnx.prepareStatement("use ATSH02");
ResultSet rs = st.executeQuery("SELECT job_name from JOB" );
System.out.println("//////// APRES TABLE_NAME");
while( (rs.next())) {
System.out.println(" JOB_NAME : "+rs.getString("job_name"));
this.listeJobsNames_Oracle_2.addElement(rs.getString(1));
}
for(int i =0; i<this.listeJobsNames_Oracle_2.size();i++){
System.out.println(" //////JOB_NAME numero : "+ i + " " +listeJobsNames_Oracle_2.elementAt(i));
}
rs.close();
// rs2.close();
st.close();
st2.close();
}
catch (SQLException e) {
JOptionPane.showMessageDialog(null,"SQLException"+" ///Exception "+e.getMessage());
}
} |
Partager