Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Posts
    35

    Unanswered: DB2 stored procedure , error SQL0804N

    HI,

    Our stored procedures is defined only outputs no inputs. When we are calling from Java or cobol it is giving the following error.

    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0804N The application program input parameters for the current request are not valid. Reason code "". If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "", SQLTYPE = "", SQLLEN = "", host variable/SQLVAR type = "". SQLSTATE=07002

    Our regular stored procedures are working I mean having I/O parameter stored procedure. We are running Db2 V 6.1 on MVS and Db2 connect to connect to Os/390 machine. We even tried from OS/390 direct with out andy db2 connect.

    Any help will be appreciated.

    Thanks,
    vasu
    vasu

  2. #2
    Join Date
    Aug 2004
    Posts
    51

    Exactly 10 parameters

    When the # of parameters (excluding the "return" parameter) equals 10, the IBM DB2 driver will raise an exception:

    System.Data.OleDb.OleDbException: [DB2/6000] SQL0804N The application program input parameters for the current request are not valid. Reason code "102". If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "10", SQLTYPE = "16", SQLLIB

    The fix for the problem is very simple: Just add a dummy parameter to the stored procedure so the # of parameters does not equal to 10.

    This bug is fixed by installing the "DB2 Application Client".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •