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.