I have a column in Oracle table which is of type NUMBER ( and it can be null ). Inorder to insert values , I create a PreparedStatement object and when I try to set the value for this column I get an invalid column type error. The code snippet is as below
preparedStatement.setObject ( paramIndex , args[i] ); where args[i] is null.
The result is the same with
preparedStatement.setObject ( paramIndex , null );
or preparedStatement.setNull ( paramIndex , java.sql.Types.NULL );
Can anybody tell me what could be the problem and how do I rectify the same