db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: SQL state 42, access permissions, SQL standard and JDBC 4.0
Date Thu, 07 Sep 2006 20:41:02 GMT
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 SQLState class value:" and Table 6.1 has these two lines
>> of interest:
>>
>> SQL State 42 ->> SQLSyntaxErrorException.

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 SQLState '42' and the
exception not be a SQLSyntaxErrorException?

Thanks,
Dan.




Mime
View raw message