Most visited

Recently visited

Added in API level 9

SQLDataException

public class SQLDataException
extends SQLNonTransientException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.sql.SQLException
         ↳ java.sql.SQLNonTransientException
           ↳ java.sql.SQLDataException


SQLState类值为' 22 '时或在供应商指定的条件下引发的SQLException的子类。 这表示各种数据错误,包括但不限于数据转换错误,除以0和函数无效参数。

请参考您的驱动程序供应商文档, 异常可能引发此 异常的供应商指定的条件。

Summary

Public constructors

SQLDataException()

构造一个 SQLDataException对象。

SQLDataException(String reason)

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

SQLDataException(String reason, String SQLState)

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

SQLDataException(String reason, String SQLState, int vendorCode)

构造一个 SQLDataException与给定对象 reasonSQLStatevendorCode

SQLDataException(Throwable cause)

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

SQLDataException(String reason, Throwable cause)

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

SQLDataException(String reason, String SQLState, Throwable cause)

构造一个 SQLDataException与给定对象 reasonSQLStatecause

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

构造一个 SQLDataException与给定对象 reasonSQLStatevendorCodecause

Inherited methods

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

Public constructors

SQLDataException

Added in API level 9
SQLDataException ()

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

SQLDataException

Added in API level 9
SQLDataException (String reason)

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

Parameters
reason String: a description of the exception

SQLDataException

Added in API level 9
SQLDataException (String reason, 
                String SQLState)

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

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

SQLDataException

Added in API level 9
SQLDataException (String reason, 
                String SQLState, 
                int vendorCode)

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

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

SQLDataException

Added in API level 9
SQLDataException (Throwable cause)

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

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

SQLDataException

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

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

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

SQLDataException

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

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

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

SQLDataException

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

Constructs a SQLDataException object with a given reason, SQLState, vendorCode and cause.

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

Hooray!