Statement 后面带上参数就行

解决方案 »

  1.   

    createStatement
    public Statement createStatement(int resultSetType,
                                     int resultSetConcurrency)
                              throws SQLExceptionCreates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and concurrency to be overridden. Parameters:
    resultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
    resultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE 
    Returns:
    a new Statement object that will generate ResultSet objects with the given type and concurrency 
    Throws: 
    SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type and concurrency
    Since: 
    1.2 
      

  2.   

    唉 我就是搞不清楚statement后面的参数,看了文章也没搞成,最后就用sql语句分页了