你去看一写Connection.createStatement()方法,他提供了一个参数
可以设置游标

解决方案 »

  1.   

    还要在createStatement里设置参数,可以查看一下帮助文档
      

  2.   

    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
      

  3.   

    还要在createStatement里设置参数,可以查看一下帮助文档