Mar 13
Aquí les dejo la función para que puedan ocuparla.
1: //Recibe como parámetro un String y retorna un String
2:
3: private String ExtraerFuncion(String usercode) throws SQLException, Exception, Error{
4:
5: String sql = "", dato="";
6: sql = "{? = call FN_RETURN_FUNCION(?)}";
7: CallableStatement cs = null;
8:
9: try
10: {
11: cs = sessionManager.getConnection().prepareCall(sql);
12: cs.registerOutParameter(1, Types.VARCHAR);
13: cs.setString(2, usercode);
14: cs.execute();
15: dato = cs.getString(1);
16: }
17: catch (Exception e)
18: {
19: e.printStackTrace();
20: }
21: finally
22: {
23: cs.close();
24: }
25: return dato;
26: }
March 15th, 2009 at 12:01 am
Muy bueno XD
Usando