[hibernate-dev] Register Out Parameters in a Stored Procedure
Max Rydahl Andersen
max.andersen at redhat.com
Tue Jun 26 11:03:31 EDT 2007
yes, so use that perfect standard compliant API.
Hibernate's support for stored procedures does not cover out parameters.
/max
> Hi Hibernate devs ..
>
> I need to execute a stored procedure in DB2 ...
>
> The problem is that i don´t know how to register an out parameter to the
> stored procedure. With simple Callable statement would be something like:
>
> String query = "{call P5PORC_CONSULTAR_CUPO_CLIENTE (?,?,?,?,?)}";
> CallableStatement cstmt = con.prepareCall(query);
> cstmt.setString(1, "1234");
> cstmt.registerOutParameter(2, Types.VARCHAR );
> cstmt.registerOutParameter(3, Types.INTEGER);
> cstmt.registerOutParameter(4, Types.VARCHAR);
> cstmt.registerOutParameter(5, Types.VARCHAR);
>
> cstmt.executeUpdate();
>
>
> Thanx ...
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list