I need to call a stored procedure using dblink and Java, I've got this code calling the stored procedure with jdbc, but now I need to do the same call using dblink
this is the call using JDBC
String sqlQuery = "{ CALL ACCUMULATED.GENERAR_ACUMULATED (?,?,?) }";
DatabaseConnection connection = new DatabaseConnection();
try {
int[] returnSQLTypes = { Types.VARCHAR };
Object[] returnValues = null;
List args = new ArrayList();
args.add(this.getCompanyCodeNgsoft(companyCode));
args.add(codUsuario);
args.add("S");
connection.connect(DatabaseConnection.NGSOFT_DATA_SOURCE_NAME);
returnValues = connection.executeStoreProcedure(sqlQuery, args,
returnSQLTypes);
String swSuccessful = (String) returnValues[0];
if ((swSuccessful != null)
&& swSuccessful.trim().equalsIgnoreCase("S")) {
successful = true;
} else {
successful = false;
}
} catch (SQLException ex) {
throw new GenerateInterfacesException(getMessageFac().getMessage(
ex.getErrorCode()));
} finally {
try {
connection.disconnect();
} catch (SQLException ex1) {
throw new GenerateInterfacesException(getMessageFac()
.getMessage(ex1.getErrorCode()));
}
}
thanks