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 127597 - SQL Editor doesn't show warnings generated from requests
Summary: SQL Editor doesn't show warnings generated from requests
Status: RESOLVED DUPLICATE of bug 257457
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
: 144503 (view as bug list)
Depends on:
Blocks: 152817
  Show dependency tree
 
Reported: 2008-02-18 06:08 UTC by nleck
Modified: 2016-01-15 22:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nleck 2008-02-18 06:08:34 UTC
A common task when tuning Sybase is to call the stored procedure :- 

   SET SHOWPLAN ON;

From then on every SQL request will have a warning attached to show the query plan. The SQL Editor does not show these
warnings.
Comment 1 Andrei Badea 2008-08-04 13:16:43 UTC
Not a defect I think. Do you happen to know how to retrieve these warnings through JDBC (java.sql.Statement, etc.)? Thanks.
Comment 2 nleck 2008-08-04 13:21:30 UTC
This is how we do it... 

    public SQLWarning getFirstWarning( final Statement stmt) throws Exception
    {
        SQLWarning warn;

        warn = stmt.getWarnings();
        if( dataBase.getType().startsWith( DataBase.TYPE_MSSQL) == false)
        {
            return warn;
        }

        while( warn != null)
        {
            if( warn.getErrorCode() != 0)
            {
                return warn;
            }
            warn = warn.getNextWarning();

        }
        return null;
    }

Comment 3 Andrei Badea 2008-08-05 12:47:58 UTC
Thank you. This is not hard to implement, but still it can't make into 6.5, which is feature-frozen.
Comment 4 David Vancouvering 2008-08-20 17:09:49 UTC
*** Issue 144503 has been marked as a duplicate of this issue. ***
Comment 5 David Vancouvering 2008-08-20 17:10:49 UTC
From Lance Andersen, who has also worked with Sybase via JDBC:

"thanks David.  both the print and raiserror are quite common in Sybase and MS SQL code/sprocs so it would be nice to
support it allowing you to execute system sprocs such as sp_help correctly in netbeans."
Comment 6 Jiri Rechtacek 2009-10-16 14:03:19 UTC
Reassigned to new owner.
Comment 7 matthias42 2016-01-15 22:22:24 UTC

*** This bug has been marked as a duplicate of bug 257457 ***