Java Doc for SQLException.java in  » Apache-Harmony-Java-SE » java-package » java » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         java.sql.SQLException

All known Subclasses:   java.sql.SQLWarning,  java.sql.BatchUpdateException,
SQLException
public class SQLException extends Exception implements Serializable(Code)
An Exception class that is used in conjunction with JDBC operations. It provides information about problems encountered with Database access and other problems related to JDBC

The SQLException class provides the following information:

  • A standard Java exception message, as a String
  • An SQLState string. This is an error description string which follows either the SQL 99 conventions or the XOPEN SQLstate conventions. The potential values of the SQLState string are described in each of the specifications. Which of the conventions is being used by the SQLState string can be discovered by using the getSQLStateType method of the DatabaseMetaData interface.
  • An Error Code, an an integer. The error code is specific to each database vendor and is typically the error code returned by the database itself.
  • A chain to a next Exception, if relevant, which can give access to additional error information.



Constructor Summary
public  SQLException()
     Creates an SQLException object.
public  SQLException(String theReason)
     Creates an SQLException object.
public  SQLException(String theReason, String theSQLState)
     Creates an SQLException object.
public  SQLException(String theReason, String theSQLState, int theErrorCode)
     Creates an SQLException object.

Method Summary
public  intgetErrorCode()
     Returns the integer error code for this SQLException The integer error code for this SQLException.
public  SQLExceptiongetNextException()
     Retrieves the SQLException chained to this SQLException, if any. The SQLException chained to this SQLException.
public  StringgetSQLState()
     Retrieves the SQLState description string for this SQLException object The SQLState string for this SQLException object.
public  voidsetNextException(SQLException ex)
     Adds the SQLException to the end of this SQLException chain.


Constructor Detail
SQLException
public SQLException()(Code)
Creates an SQLException object. The Reason string is set to null, the SQLState string is set to null and the Error Code is set to 0.



SQLException
public SQLException(String theReason)(Code)
Creates an SQLException object. The Reason string is set to the given reason string, the SQLState string is set to null and the Error Code is set to 0.
Parameters:
  theReason - the string to use as the Reason string



SQLException
public SQLException(String theReason, String theSQLState)(Code)
Creates an SQLException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the Error Code is set to 0.
Parameters:
  theReason - the string to use as the Reason string
Parameters:
  theSQLState - the string to use as the SQLState string



SQLException
public SQLException(String theReason, String theSQLState, int theErrorCode)(Code)
Creates an SQLException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the Error Code is set to the given error code value.
Parameters:
  theReason - the string to use as the Reason string
Parameters:
  theSQLState - the string to use as the SQLState string
Parameters:
  theErrorCode - the integer value for the error code




Method Detail
getErrorCode
public int getErrorCode()(Code)
Returns the integer error code for this SQLException The integer error code for this SQLException. The meaning of thecode is specific to the vendor of the database.



getNextException
public SQLException getNextException()(Code)
Retrieves the SQLException chained to this SQLException, if any. The SQLException chained to this SQLException. null if there isno SQLException chained to this SQLException.



getSQLState
public String getSQLState()(Code)
Retrieves the SQLState description string for this SQLException object The SQLState string for this SQLException object. This is anerror description string which follows either the SQL 99conventions or the XOPEN SQLstate conventions. The potentialvalues of the SQLState string are described in each of thespecifications. Which of the conventions is being used by theSQLState string can be discovered by using the getSQLStateTypemethod of the DatabaseMetaData interface.



setNextException
public void setNextException(SQLException ex)(Code)
Adds the SQLException to the end of this SQLException chain.
Parameters:
  ex - the new SQLException to be added to the end of the chain




Methods inherited from java.lang.Throwable
public Throwable fillInStackTrace()(Code)(Java Doc)
public Throwable getCause()(Code)(Java Doc)
public String getLocalizedMessage()(Code)(Java Doc)
public String getMessage()(Code)(Java Doc)
public StackTraceElement[] getStackTrace()(Code)(Java Doc)
public Throwable initCause(Throwable initialCause)(Code)(Java Doc)
public void printStackTrace()(Code)(Java Doc)
public void printStackTrace(PrintStream ps)(Code)(Java Doc)
public void printStackTrace(PrintWriter pw)(Code)(Java Doc)
public void setStackTrace(StackTraceElement[] stackTrace)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.