Most visited

Recently visited

Added in API level 1

SQLWarning

public class SQLWarning
extends SQLException

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


提供有关数据库访问警告信息的例外。 警告被无声地链接到其方法导致其被报告的对象。

警告可以从被检索ConnectionStatement ,和ResultSet对象。 尝试在连接关闭后检索警告会导致引发异常。 同样,试图在语句关闭后或语句关闭后的结果集上检索警告将导致引发异常。 请注意,关闭语句也会关闭它可能产生的结果集。

也可以看看:

Summary

Public constructors

SQLWarning(String reason, String SQLState, int vendorCode)

构造一个 SQLWarning与给定对象 reasonSQLStatevendorCode

SQLWarning(String reason, String SQLState)

用给定的 reasonSQLState构造一个 SQLWarning对象。

SQLWarning(String reason)

用给定的 reason构造一个 SQLWarning对象。

SQLWarning()

构造一个 SQLWarning对象。

SQLWarning(Throwable cause)

用给定的 cause构造一个 SQLWarning对象。

SQLWarning(String reason, Throwable cause)

使用给定的 reasoncause构造一个 SQLWarning对象。

SQLWarning(String reason, String SQLState, Throwable cause)

构造一个 SQLWarning与给定对象 reasonSQLStatecause

SQLWarning(String reason, String SQLState, int vendorCode, Throwable cause)

构造一个 SQLWarning与给定对象 reasonSQLStatevendorCodecause

Public methods

SQLWarning getNextWarning()

通过 setNextWarning检索链接到此 SQLWarning对象的 setNextWarning

void setNextWarning(SQLWarning w)

将一个 SQLWarning对象添加到链的末尾。

Inherited methods

From class java.sql.SQLException
From class java.lang.Throwable
From class java.lang.Object
From interface java.lang.Iterable

Public constructors

SQLWarning

Added in API level 1
SQLWarning (String reason, 
                String SQLState, 
                int vendorCode)

构造一个SQLWarning与给定对象reasonSQLStatevendorCode cause未初始化,并可能随后通过调用initCause(java.lang.Throwable)方法进行初始化。

Parameters
reason String: a description of the warning
SQLState String: an XOPEN or SQL:2003 code identifying the warning
vendorCode int: a database vendor-specific warning code

SQLWarning

Added in API level 1
SQLWarning (String reason, 
                String SQLState)

使用给定的reasonSQLState构造一个SQLWarning对象。 cause未初始化,并可能随后通过调用initCause(java.lang.Throwable)方法进行初始化。 供应商代码初始化为0。

Parameters
reason String: a description of the warning
SQLState String: an XOPEN or SQL:2003 code identifying the warning

SQLWarning

Added in API level 1
SQLWarning (String reason)

用给定的reason构造一个SQLWarning对象。 SQLState初始化为null ,并将供应商代码初始化为0. cause未初始化,并可能随后通过调用initCause(java.lang.Throwable)方法进行初始化。

Parameters
reason String: a description of the warning

SQLWarning

Added in API level 1
SQLWarning ()

构造一个SQLWarning对象。 reasonSQLState被初始化为null和供应商代码被初始化为0。 cause没有初始化,随后可以通过向一个呼叫进行初始化initCause(java.lang.Throwable)方法。

SQLWarning

Added in API level 9
SQLWarning (Throwable cause)

用给定的cause构造一个SQLWarning对象。 SQLState初始化为null ,供应商代码初始化为0. reason初始化为null如果为cause==nullcause.toString()如果为null则初始化为cause!=null

Parameters
cause Throwable: the underlying reason for this SQLWarning (which is saved for later retrieval by the getCause() method); may be null indicating the cause is non-existent or unknown.

SQLWarning

Added in API level 9
SQLWarning (String reason, 
                Throwable cause)

用给定的reasoncause构造一个SQLWarning对象。 SQLState初始化为null ,供应商代码初始化为0。

Parameters
reason String: a description of the warning
cause Throwable: the underlying reason for this SQLWarning (which is saved for later retrieval by the getCause() method); may be null indicating the cause is non-existent or unknown.

SQLWarning

Added in API level 9
SQLWarning (String reason, 
                String SQLState, 
                Throwable cause)

构造一个SQLWarning与给定对象reasonSQLStatecause 供应商代码初始化为0。

Parameters
reason String: a description of the warning
SQLState String: an XOPEN or SQL:2003 code identifying the warning
cause Throwable: the underlying reason for this SQLWarning (which is saved for later retrieval by the getCause() method); may be null indicating the cause is non-existent or unknown.

SQLWarning

Added in API level 9
SQLWarning (String reason, 
                String SQLState, 
                int vendorCode, 
                Throwable cause)

构造一个 SQLWarning与给定对象 reasonSQLStatevendorCodecause

Parameters
reason String: a description of the warning
SQLState String: an XOPEN or SQL:2003 code identifying the warning
vendorCode int: a database vendor-specific warning code
cause Throwable: the underlying reason for this SQLWarning (which is saved for later retrieval by the getCause() method); may be null indicating the cause is non-existent or unknown.

Public methods

getNextWarning

Added in API level 1
SQLWarning getNextWarning ()

通过 setNextWarning检索链接到此 SQLWarning对象的 setNextWarning

Returns
SQLWarning the next SQLException in the chain; null if none

也可以看看:

setNextWarning

Added in API level 1
void setNextWarning (SQLWarning w)

SQLWarning对象添加到链的末尾。

Parameters
w SQLWarning: the new end of the SQLException chain

也可以看看:

Hooray!