This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 154747

Summary: Add ability to save results as SQL cursor
Product: db Reporter: Roman Mostyka <romanmostyka>
Component: Show DataAssignee: Libor Fischmeistr <lfischmeistr>
Status: NEW ---    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Roman Mostyka 2008-12-05 14:07:16 UTC
Add ability to save results as SQL cursor. In this case IDE automatically generates cursor variables and cursor body.
Not so important and therefore I set priority to P4, but probably, if we have time in the future, it will be nice
feature to have.
Example of generated SQL cursor for PERSON table from "travel" Java DB:

begin
    DECLARE @personid INTEGER;
    DECLARE @name VARCHAR(50);
    DECLARE @jobtitle VARCHAR(50);
    DECLARE @frequentflyer SMALLINT;
    DECLARE @lastupdated TIMESTAMP;
    DECLARE @qry long varchar;

    set @qry = 'select personid, name, jobtitle, frequentflyer, lastupdated from person';
    begin
        declare cur_query cursor using @qry;

        open cur_query;
        lp: LOOP
            FETCH NEXT cur_query INTO ;
            IF SQLCODE <> 0 THEN LEAVE lp END IF;
        END LOOP;
        close cur_query;
    end
end
Comment 1 Jiri Rechtacek 2009-10-16 14:14:49 UTC
Reassigned to new owner.