Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#164 SQL Error Help

2.1final
closed
Rob Manning
5
2007-09-22
2006-03-09
maddogskip
No

I was wondering if you could make it so that upon
error the SQL window would scroll to the offending
text that is causing the problem. Sometimes there is
a generic error such as, "Invalid Identifier", and I
have no idea what it is talking about. I then have
to either spend a bunch of time reading the code to
find the problem or copy it into SQL plus to get a
quick pointer to the problem.

Thanks in advance...

Tom

Discussion

  • Colin Bell
    Colin Bell
    2006-11-02

    Logged In: YES
    user_id=233132

    I'm not sure that this is possible. The error messages are
    the only way we have of seeing what the error is. If the
    message is something like:

    Error: java.sql.SQLException: [SQL5001] Column qualifier or
    table undefined, SQL State: 42703, Error Code: -5001

    Then how do we identify what text we should scroll to?

    I notice you've attached this to the Oracle plugin so if
    Oracle gives more information about the error can you give
    me some details. I don't currently have access to Oracle.

     
  • Steven Lumos
    Steven Lumos
    2007-02-13

    Logged In: YES
    user_id=99931
    Originator: NO

    Yay for Ask Tom redesign breaking all old URLs... Here's the updated URL for the page I mentioned in my last comment.

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:37374854935920

    I think the basic idea is when you get an error, you execute the query again with some PL/SQL wrapped around it to get a character offset into the query.

     
  • Rob Manning
    Rob Manning
    2007-02-14

    Logged In: YES
    user_id=1287991
    Originator: NO

    Nice link! So, we can show the error for 'INSERT', 'UPDATE', 'DELETE', 'MERGE ', 'SELECT', but just no for DDL. This would be a nice enhancement once the work on the new custom QueryTokenizer for Oracle is finished. I'm still beating on it a bit, but when it's finished it will be able to parse procedure/trigger declarations and even suck in scripts a la '@' like SQL-Plus.

    Rob

     
  • Rob Manning
    Rob Manning
    2007-09-22

    • status: open --> closed
     
  • Rob Manning
    Rob Manning
    2007-09-22

    Logged In: YES
    user_id=1287991
    Originator: NO

    Added capability to put the cursor at the position in the SQL where the statement failed. Available in the next snapshot.

    Rob