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 27 28 29 30 31 32 33 34 35 36
|
public void executeAidenligne(Connection connect, String codsor, String typ) {
codsor = codsor.toUpperCase();
typ = typ.toUpperCase();
sql = "select * from t_bfile where upper(id) = '" + typ + "_" + codsor + "'";
System.out.println("sql = " + sql);
executeSql(connect, sql);
}
private synchronized void executeSql(Connection connect, String sql){
try{
System.out.println("ko1");
instruction = connect.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
System.out.println("ko2");
resultat = instruction.executeQuery(sql);
System.out.println("ko3 = " + resultat.getFetchSize());
resultat.next();
System.out.println("ko4 = " + resultat.getString(1));
BFILE bfile = ((OracleResultSet)resultat).getBFILE(2);
System.out.println("ko5 = "+ bfile);
}
catch(SQLException e){
}
//
catch(Exception e){
}
} |
Partager