SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Daniel John Debrunner
The SQL standard says that SQL State '42' is for syntax error or access rule violation (section 23.1). JDBC 4.0 states in section 6.5.1 that TABLE 6-1 specifies which NonTransientSQLException subclass must be thrown for a a given SQLState class value: and Table 6.1 has these two lines of

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Yip Ng
For Q1) I think it should use SQLSTATE class code of '42' instead of '28'. class code '42' is used for syntax error or access rule violation according to theSQL spec.Yip On 9/7/06, Daniel John Debrunner [EMAIL PROTECTED] wrote: The SQL standard says that SQL State '42' is for syntax error or

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Mamta Satoor
Does 'N/A' in JDBC 4.0 spec(Table6.1)mean Derby is free to choose the the SQL State number? If so, then I think we shold definitely use '42' foraccess rule violation since that will satisfy SQL specification too. Also it seems for access rule violation,SQLInvalidAuthorizationException would be

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Lance J. Andersen
Daniel John Debrunner wrote: The SQL standard says that SQL State '42' is for syntax error or access rule violation (section 23.1). JDBC 4.0 states in section 6.5.1 that TABLE 6-1 specifies which NonTransientSQLException subclass must be thrown for a a given SQLState class value: and Table

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Knut Anders Hatlen
Mamta Satoor [EMAIL PROTECTED] writes: Does 'N/A' in JDBC 4.0 spec(Table 6.1) mean Derby is free to choose the the SQL State number? If so, then I think we shold definitely use '42' for access rule violation since that will satisfy SQL specification too. Also it seems for access rule

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Daniel John Debrunner
Mamta Satoor wrote: Does 'N/A' in JDBC 4.0 spec(Table 6.1) mean Derby is free to choose the the SQL State number? If so, then I think we shold definitely use '42' for access rule violation since that will satisfy SQL specification too. Also it seems for access rule violation,

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Daniel John Debrunner
Lance J. Andersen wrote: Daniel John Debrunner wrote: The SQL standard says that SQL State '42' is for syntax error or access rule violation (section 23.1). JDBC 4.0 states in section 6.5.1 that TABLE 6-1 specifies which NonTransientSQLException subclass must be thrown for a a given

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Lance J. Andersen
The javadoc SQLSyntaxErrorException for says: The subclass of SQLException thrown when the SQLState class value is '42'. This indicates that the in-progress query has violated SQL syntax rules. This somewhat in-conflict with the SQL Standard. Can a JDBC driver thrown an exception with

Re: SQL state 42, access permissions, SQL standard and JDBC 4.0

2006-09-07 Thread Lance J. Andersen
Daniel John Debrunner wrote: Lance J. Andersen wrote: Daniel John Debrunner wrote: The SQL standard says that SQL State '42' is for "syntax error or access rule violation" (section 23.1). JDBC 4.0 states in section 6.5.1 that "TABLE 6-1 specifies which