IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
 
[Sommaire]  [Top 50]  [F.A.Q.]  [ Java SE ]  [ Java EE ]  [Javadoc standard]  [Contact]
[ 1.4.2 ]  [ 5.0 ]  [ 6.0
Rechercher   
Dans
Options   sensible à la casse
étendre la recherche aux descriptions
Préférences
fr en 
 
Moteurs de recherche
JavaTM 2 Platform Std. Ed. v1.5.0

java.sql
Class SQLWarning

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by java.sql.SQLWarning
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataTruncation

public class SQLWarning
extends SQLException

An exception that provides information on database access warnings. Warnings are silently chained to the object whose method caused it to be reported.

Warnings may be retrieved from Connection, Statement, and ResultSet objects. Trying to retrieve a warning on a connection after it has been closed will cause an exception to be thrown. Similarly, trying to retrieve a warning on a statement after it has been closed or on a result set after it has been closed will cause an exception to be thrown. Note that closing a statement also closes a result set that it might have produced.

See Also:
Connection.getWarnings(), Statement.getWarnings(), ResultSet.getWarnings(), Serialized Form

Constructor Summary
SQLWarning()
          Constructs a default SQLWarning object.
SQLWarning(String reason)
          Constructs an SQLWarning object with the given value for a reason; SQLstate defaults to null, and vendorCode defaults to 0.
SQLWarning(String reason, String SQLstate)
          Constructs an SQLWarning object with the given reason and SQLState; the vendorCode defaults to 0.
SQLWarning(String reason, String SQLstate, int vendorCode)
          Constructs a fully-specified SQLWarning object initialized with the given values.
 
Method Summary
 SQLWarning getNextWarning()
          Retrieves the warning chained to this SQLWarning object.
 void setNextWarning(SQLWarning w)
          Adds an SQLWarning object to the end of the chain.
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLWarning

public SQLWarning(String reason,
                  String SQLstate,
                  int vendorCode)
Constructs a fully-specified SQLWarning object initialized with the given values.

Parameters:
reason - a description of the warning
SQLstate - an XOPEN code identifying the warning
vendorCode - a database vendor-specific warning code

SQLWarning

public SQLWarning(String reason,
                  String SQLstate)
Constructs an SQLWarning object with the given reason and SQLState; the vendorCode defaults to 0.

Parameters:
reason - a description of the warning
SQLstate - an XOPEN code identifying the warning

SQLWarning

public SQLWarning(String reason)
Constructs an SQLWarning object with the given value for a reason; SQLstate defaults to null, and vendorCode defaults to 0.

Parameters:
reason - a description of the warning

SQLWarning

public SQLWarning()
Constructs a default SQLWarning object. The reason defaults to null, SQLState defaults to null, and vendorCode defaults to 0.

Method Detail

getNextWarning

public SQLWarning getNextWarning()
Retrieves the warning chained to this SQLWarning object.

Returns:
the next SQLException in the chain; null if none
See Also:
setNextWarning(java.sql.SQLWarning)

setNextWarning

public void setNextWarning(SQLWarning w)
Adds an SQLWarning object to the end of the chain.

Parameters:
w - the new end of the SQLException chain
See Also:
getNextWarning()

Copyright 2003 Sun Microsystems, Inc. All rights reserved