public class

SQLWarning

extends SQLException
implements Serializable
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.sql.SQLException
         ↳ java.sql.SQLWarning
Known Direct Subclasses

Class Overview

An exception class that holds information about Database access warnings.

Summary

Public Constructors
SQLWarning()
Creates an SQLWarning object.
SQLWarning(String theReason)
Creates an SQLWarning object.
SQLWarning(String theReason, String theSQLState)
Creates an SQLWarning object.
SQLWarning(String theReason, String theSQLState, int theErrorCode)
Creates an SQLWarning object.
Public Methods
SQLWarning getNextWarning()
Gets the next SQLWarning chained to this SQLWarning object.
void setNextWarning(SQLWarning w)
Chains a supplied SQLWarning to this SQLWarning.
[Expand]
Inherited Methods
From class java.sql.SQLException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public SQLWarning ()

Since: API Level 1

Creates an SQLWarning object. The reason string is set to null, the SQLState string is set to null and the error code is set to 0.

public SQLWarning (String theReason)

Since: API Level 1

Creates an SQLWarning 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 reason why this warning is issued.

public SQLWarning (String theReason, String theSQLState)

Since: API Level 1

Creates an SQLWarning 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 reason why this warning is issued.
theSQLState the string to use as the SQLState string.

public SQLWarning (String theReason, String theSQLState, int theErrorCode)

Since: API Level 1

Creates an SQLWarning 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 reason why this warning is issued.
theSQLState the X/Open standard specifc error code.
theErrorCode a vendor specific error code.

Public Methods

public SQLWarning getNextWarning ()

Since: API Level 1

Gets the next SQLWarning chained to this SQLWarning object.

Returns
  • the SQLWarning chained to this SQLWarning. null if no SQLWarning is chained to this SQLWarning.

public void setNextWarning (SQLWarning w)

Since: API Level 1

Chains a supplied SQLWarning to this SQLWarning.

Parameters
w the SQLWarning linked to this SQLWarning.