Hi there.
I have read some stuff on the internet (and, of course, on the manual), but I didn't find out how to call a stored procedure without mapping it.
Well, you might ask me why don't I want to map it. In fact, it's because of my boss' order. I have some tables that are used to count a lot of things. In order to manage that dynamically, I have to register formulae of calculation in a stored procedure. So, as I can't know how many stored procedures I will have, I gather their name in a table.
So I can't map all these procedures as I don't know them.
That's why I need your help on how to do that.
As far as I searched, I found I could use a deprecated method. But I'd rather not call it.
There is some code I've found :
Code:
String req = "{? = call nbRestant(?)}";
try
{
CallableStatement cs = conn.prepareCall(req);
cs.registerOutParameter( 1, Types.INTEGER);
cs.setInt(2, ref);
cs.execute();
nb = cs.getInt(1);
}
catch (SQLException e)
{
e.printStackTrace();
}
Thank you in advance