Announcement Announcement Module
Collapse
No announcement yet.
Not a valid month - when calling stored proc Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Not a valid month - when calling stored proc

    Hi all

    I have the following input variables for my Stored Proc:

    sID IN NUMBER DEFAULT NULL ,
    cID IN NUMBER DEFAULT NULL ,
    pID IN NUMBER DEFAULT NULL ,
    rDate IN VARCHAR2 DEFAULT NULL ,
    ptype_ID IN NUMBER DEFAULT NULL ,
    htID IN NUMBER DEFAULT NULL ,
    scID IN NUMBER DEFAULT NULL ,
    cValue IN NUMBER DEFAULT NULL ,
    pValue IN NUMBER DEFAULT NULL

    When I call the proc from my Spring/Java I get the following error:

    ORA-01839: date not valid for month specified

    The following is my Java call:

    Code:
    declareParameter(new SqlParameter("inputParam1", Types.DOUBLE));
                    declareParameter(new SqlParameter("inputParam2", Types.DOUBLE));
                    declareParameter(new SqlParameter("inputParam3", Types.DOUBLE));
                    //                declareParameter(new SqlParameter("inputParam4", Types.DATE));
                    declareParameter(new SqlParameter("inputParam4", Types.VARCHAR));
                    declareParameter(new SqlParameter("inputParam5", Types.DOUBLE));
                    declareParameter(new SqlParameter("inputParam6", Types.DOUBLE));
                    declareParameter(new SqlParameter("inputParam7", Types.DOUBLE));
                    declareParameter(new SqlParameter("inputParam8", Types.DOUBLE));
                    declareParameter(new SqlParameter("inputParam9", Types.DOUBLE));
    
    Map params = new HashMap();
            params.put("inputParam1", 1212);
            params.put("inputParam2", 2);
            params.put("inputParam3", 2);
            //        params.put("inputParam4", reportDate);
            params.put("inputParam4", "06/31/2009");
            params.put("inputParam5", 1);
            params.put("inputParam6", 2);
            params.put("inputParam7", 1);
            params.put("inputParam8", 1999);
            params.put("inputParam9", 1999);
    Could someone point out what I am doing wrong here? I am assuming its to do with the inputParam4.

  • #2
    My mistake was passing the 31-Jun-2009 where Jun only has 30 days!!

    Also there was an issue with my stored proc internally.

    Comment


    • #3
      Could it be that there are only 30 days in June?

      Steve O

      Comment

      Working...
      X