Too few parameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thesti
    New Member
    • Nov 2007
    • 144

    #1

    Too few parameters

    hi,

    i have these lines of code (they are jsp)

    Code:
    13: 	ResultSet result = statement.executeQuery("select COUNT(id) from message where to='test'");
    14: 	Integer inbox = result.getInt(0);
    but then when i execute, i get the following error

    Code:
    javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    did i do something wrong?

    thanks.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    You posted this question in the Access forum.

    Although there is a reference to Access, this is not an Access problem.

    I will move it to the JavaScript forum on the understanding this is the code you're using. Let me know if it should really be somewhere else.

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      Too few parameters

      Originally posted by NeoPa
      I will move it to the JavaScript forum on the understanding this is the code you're using. Let me know if it should really be somewhere else.
      to me it looks rather like Java. definitely not JavaScript.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        Thanks Dormilich. I'll try there.

        Comment

        Working...