Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When using a store procedure with in and out parameters, if parameter is set BEFORE registering parameter as an output parameter, it will be sent as NULL to server.
example :
cstmt = connection.prepareCall(sql);
|
cstmt.setLong(1, 42L); |
cstmt.registerOutParameter(1, Types.NUMERIC); |
cstmt.executeQuery();
|
as a workaround, registering parameter before setting value has correct behavior:
cstmt = connection.prepareCall(sql);
|
cstmt.registerOutParameter(1, Types.NUMERIC); |
cstmt.setLong(1, 42L); |
cstmt.executeQuery();
|