Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    2

    Question Unanswered: DATA ERROR [IBM][CLI Driver][DB2/LINUX] SQL0104N

    DATA ERROR [IBM][CLI Driver][DB2/LINUX] SQL0104N An unexpected token "?" was found following "DB2INST1.scustomer(?". Expected tokens may include: "+". SQLSTATE=42601

    Hi

    I am using a stored procedure in a java code which on execution is giving my this exception. The procedure call is shown below :

    cstmt=con.prepareCall("call db2inst1.scustomer(? ? ?)");
    cstmt.setString(1,phoneID);
    cstmt.setString(2,firstName);
    cstmt.setString(3,lastName);
    result = cstmt.executeQuery();

    I have checked and the procedure accepts three parameters, and it runs fine if i call it from db2 prompt. Can some one suggets what is the problem behind the exception ?
    As i am not getting any Tomcat messages so i think this error is not related to any tomcat jar or any other thing

    Any suggestion is welcome

    regards
    Just to Know

  2. #2
    Join Date
    Jan 2005
    Posts
    36

    Smile

    Hi,

    You have missed out on the commas to separate the parameters in the procedure call. Make the change and it should work fine.

    Regards,
    Ritz

  3. #3
    Join Date
    Feb 2005
    Posts
    2

    Thanks ritz

    Hi Ritz

    Thanks putting commas soled the problem.

    regards

Posting Permissions

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