JavaTM 2 Platform
Standard Ed. 5.0

java.sql
Ŭ·¡½º SQLException

java.lang.Object 
  »óÀ§¸¦ È®Àå java.lang.Throwable 
      »óÀ§¸¦ È®Àå java.lang.Exception 
          »óÀ§¸¦ È®Àå java.sql.SQLException
¸ðµç ±¸ÇöµÈ ÀÎÅÍÆäÀ̽º:
Serializable
¾Ë·ÁÁø Á÷°è ¼­ºê Ŭ·¡½º:
BatchUpdateException, RowSetWarning, SerialException, SQLWarning, SyncFactoryException, SyncProviderException

public class SQLException
extends Exception

µ¥ÀÌŸº£À̽º ¾×¼¼½º ¿¡·¯ ¶Ç´Â ±× ¿ÜÀÇ ¿¡·¯¿¡ °üÇÑ Á¤º¸¸¦ Á¦°øÇÏ´Â ¿¹¿ÜÀÔ´Ï´Ù.

°¢ SQLException´Â ´ÙÀ½°ú °°Àº Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù.

°ü·Ã Ç׸ñ:
Á÷·ÄÈ­ µÈ Çü½Ä

»ý¼ºÀÚ °³¿ä
SQLException ()
          SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
SQLException (String  reason)
          ÁöÁ¤µÈ reason ·Î SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
SQLException (String  reason, String  SQLState)
          ÁöÁ¤µÈ reason¿Í SQLState ·Î SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
SQLException (String  reason, String  SQLState, int vendorCode)
          ¿ÏÀü ÁöÁ¤ÀÇ SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
 int getErrorCode ()
          ÀÌ SQLException °´Ã¼ÀÇ º¥´õ °íÀ¯ÀÇ ¿¹¿Ü Äڵ带 ÃëµæÇÕ´Ï´Ù.
 SQLException getNextException ()
          ÀÌ SQLException °´Ã¼¿¡ üÀÎ µÈ ¿¹¿Ü¸¦ ÃëµæÇÕ´Ï´Ù.
 String getSQLState ()
          ÀÌ SQLException °´Ã¼ÀÇ SQLState¸¦ ÃëµæÇÕ´Ï´Ù.
 void setNextException (SQLException  ex)
          Ã¼ÀÎÀÇ ¸¶Áö¸·¿¡ SQLException °´Ã¼¸¦ Ãß°¡ÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. Throwable ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

SQLException

public SQLException(String  reason,
                    String  SQLState,
                    int vendorCode)
¿ÏÀü ÁöÁ¤ÀÇ SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
reason - ¿¹¿ÜÀÇ ¼³¸í
SQLState - ¿¹¿Ü¸¦ ½Äº°ÇÏ´Â XOPEN ÄÚµå ¶Ç´Â SQL 99 ÄÚµå
vendorCode - µ¥ÀÌŸº£À̽º º¥´õ °íÀ¯ÀÇ ¿¹¿Ü ÄÚµå

SQLException

public SQLException(String  reason,
                    String  SQLState)
ÁöÁ¤µÈ reason¿Í SQLState ·Î SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù. vendorCode ÇʵåÀÇ µðÆúÆ®´Â 0 À¸·Î ¼³Á¤µË´Ï´Ù.

ÆĶó¹ÌÅÍ:
reason - ¿¹¿ÜÀÇ ¼³¸í
SQLState - ¿¹¿Ü¸¦ ½Äº°ÇÏ´Â XOPEN ÄÚµå ¶Ç´Â SQL 99 ÄÚµå

SQLException

public SQLException(String  reason)
ÁöÁ¤µÈ reason ·Î SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù. SQLState ÇʵåÀÇ µðÆúÆ®´Â null, vendorCode ÇʵåÀÇ µðÆúÆ®´Â 0¿¡ °¢°¢ ¼³Á¤µË´Ï´Ù.

ÆĶó¹ÌÅÍ:
reason - ¿¹¿ÜÀÇ ¼³¸í

SQLException

public SQLException()
SQLException °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù. reason ÇʵåÀÇ µðÆúÆ®´Â null, SQLState ÇʵåÀÇ µðÆúÆ®´Â null, vendorCode ÇʵåÀÇ µðÆúÆ®´Â 0¿¡ °¢°¢ ¼³Á¤µË´Ï´Ù.

¸Þ¼­µåÀÇ »ó¼¼

getSQLState

public String  getSQLState()
ÀÌ SQLException °´Ã¼ÀÇ SQLStateÀ» ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
SQLState Ä¡

getErrorCode

public int getErrorCode()
ÀÌ SQLException °´Ã¼ÀÇ º¥´õ °íÀ¯ÀÇ ¿¹¿Ü Äڵ带 ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
º¥´õÀÇ ¿¡·¯ ÄÚµå

getNextException

public SQLException  getNextException()
ÀÌ SQLException °´Ã¼¿¡ üÀÎ µÈ ¿¹¿Ü¸¦ ÃëµæÇÕ´Ï´Ù.

¹Ýȯ°ª:
üÀÎÀÇ ´ÙÀ½ÀÇ SQLException °´Ã¼. ¾ø´Â °æ¿ì´Â null
°ü·Ã Ç׸ñ:
setNextException(java.sql.SQLException)

setNextException

public void setNextException(SQLException  ex)
üÀÎÀÇ ¸¶Áö¸·¿¡ SQLException °´Ã¼¸¦ Ãß°¡ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
ex - SQLException üÀÎÀÇ ¸¶Áö¸·¿¡ Ãß°¡µÇ´Â »õ·Î¿î ¿¹¿Ü
°ü·Ã Ç׸ñ:
getNextException()

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.