wood burning stoves 2.0*
The moose likes JDBC and the fly likes SQL Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL Exception" Watch "SQL Exception" New topic
Author

SQL Exception

krishan go
Greenhorn

Joined: May 20, 2011
Posts: 8
wat is the meaning of
if((((SQLException)e).getSQLState()) == false)
where e is an instance of SQLException


Krishan
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Looks pretty meaningless to me.

getSQLState() returns a String which is the code is comparing with a boolean value.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
krishan go
Greenhorn

Joined: May 20, 2011
Posts: 8
ya it was pretty stupid of me :p
krishan go
Greenhorn

Joined: May 20, 2011
Posts: 8
actualy the statement is
if (ignoreSQLException(((SQLException)e).getSQLState()) == false)
how does ignoreSQLException return a boolean value...

forgive me for bein such a noob...
krishan go
Greenhorn

Joined: May 20, 2011
Posts: 8
please reply...
wat does ignoresqlexception() do
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

No idea. Its not part of the JDK. Who wrote it? You could ask them.
 
 
subject: SQL Exception