Announcement Announcement Module
Collapse
No announcement yet.
Spring StoredProcedure Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring StoredProcedure

    Hi,

    I am having problems inserting NULL into my procedure using java.sql.Types.NULL.
    I receive an exception saying "Invalid object type (or null object) specified for setObject()".

    My code is something like :
    Code:
    public class MyProc extends StoredProcedure{
    
     public MyProc(){
    super(jdbcTemplate, "procedure_name");
    ... declareParameter(new SqlParameter("param_name", Types.NULL)); ...
    }//end constructor public void execute(){
    Map<String, Object> inParams = new HashMap<String, Object>();
    inParams.put("param_name", null);
    execute(inParams);
    }//end method execute }
    What am I missing? (BTW I am using Sybase Database)
Working...
X