I have something Java code like the following to use JDBC Connection to call a PL/SQL proceudre on Oracle 8i.
The problem is with the CHAR field, when char is not null, then result1 becomes something like 32K of spaces!!
when it is null, it is returned as null!
Is there some sort of configuration in Oracle to stop this from happening? Note that the VARCHAR to get returned properly regardless of whether the value is null or not.
Anyone know what is wrong please?
The problem is with the CHAR field, when char is not null, then result1 becomes something like 32K of spaces!!
when it is null, it is returned as null!
Is there some sort of configuration in Oracle to stop this from happening? Note that the VARCHAR to get returned properly regardless of whether the value is null or not.
Code:
sCall.setString(MyConstant.STOREPROCEDURE_PARAM_CRITERION, Criterion);
sCall = jdbcConnection.prepareCall(???);
sCall.registerOutParameter(MyConstant.STOREPROCEDURE_PARAM_CODE, Types.CHAR);
sCall.registerOutParameter(MyConstant.STOREPROCEDURE_PARAM_DESCR, Types.VARCHAR);
sCall.executeQuery();
result1 = sCall.getString(STOREPROCEDURE_PARAM_CODE);
result2 = sCall.getString(STOREPROCEDURE_PARAM_DESCR);
Anyone know what is wrong please?