public class SQLDataException extends SQLNonTransientException
SQLException的子类。
这表示各种数据错误,包括但不限于数据转换错误,除以0,以及函数的无效参数。
请咨询您的驱动程序供应商文档,了解供应商异常可能抛出此异常 。
| Constructor and Description |
|---|
SQLDataException()
构造一个
SQLDataException对象。
|
SQLDataException(String reason)
构造一个
SQLDataException对象与给定的
reason 。
|
SQLDataException(String reason, String SQLState)
使用给定的
reason和
SQLState构造一个
SQLDataException对象。
|
SQLDataException(String reason, String SQLState, int vendorCode)
构造一个
SQLDataException与给定对象
reason ,
SQLState和
vendorCode 。
|
SQLDataException(String reason, String SQLState, int vendorCode, Throwable cause)
构造一个
SQLDataException与给定对象
reason ,
SQLState ,
vendorCode和
cause 。
|
SQLDataException(String reason, String SQLState, Throwable cause)
构造一个
SQLDataException与给定对象
reason ,
SQLState和
cause 。
|
SQLDataException(String reason, Throwable cause)
构造一个
SQLDataException对象与给定的
reason和
cause 。
|
SQLDataException(Throwable cause)
构造一个
SQLDataException对象与给定的
cause 。
|
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic SQLDataException()
SQLDataException对象。
的reason , SQLState被初始化为null ,供应商代码被初始化为0。 cause没有初始化,随后可以通过调用被初始化Throwable.initCause(java.lang.Throwable)方法。
public SQLDataException(String reason)
SQLDataException对象与给定的reason 。
SQLState初始化为null ,供应商代码初始化为0. cause未初始化,随后可以通过调用Throwable.initCause(java.lang.Throwable)方法初始化 。
reason - 异常的描述
public SQLDataException(String reason, String SQLState)
reason和SQLState构造一个SQLDataException对象。
供应商代码初始化为0. cause未初始化,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法进行初始化 。
reason - 异常的描述
SQLState -
SQLState的XOPEN或SQL:2003代码
public SQLDataException(String reason, String SQLState, int vendorCode)
SQLDataException与给定对象reason , SQLState和vendorCode 。
cause未初始化,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法初始化 。
reason - 异常的描述
SQLState -
SQLState的XOPEN或SQL:2003代码
vendorCode - 数据库供应商特定的异常代码
public SQLDataException(Throwable cause)
SQLDataException对象与给定的cause 。
该SQLState被初始化为null ,供应商代码被初始化为0。 reason被初始化为null如果cause==null ,或cause.toString()如果cause!=null 。
cause -底层原因SQLException (保存用于由稍后检索getCause()方法);
可能为空,表示原因不存在或未知。
public SQLDataException(String reason, Throwable cause)
SQLDataException对象与给定的reason和cause 。
SQLState初始化为null ,供应商代码初始化为0。
reason - 异常的描述。
cause -底层原因SQLException (保存用于由稍后检索getCause()方法);
可能为空,表示原因不存在或未知。
public SQLDataException(String reason, String SQLState, Throwable cause)
SQLDataException与给定对象reason , SQLState和cause 。
供应商代码初始化为0。
reason - 异常的描述。
SQLState -
SQLState的XOPEN或SQL:2003代码
cause - 这个SQLException (其保存以供getCause()方法稍后检索)的根本原因;
可能为空,表示原因不存在或未知。
public SQLDataException(String reason, String SQLState, int vendorCode, Throwable cause)
SQLDataException与给定对象
reason ,
SQLState ,
vendorCode和
cause 。
reason - 异常的描述
SQLState -
SQLState的XOPEN或SQL:2003代码
vendorCode - 数据库供应商特定的异常代码
cause -底层原因SQLException (保存用于由稍后检索getCause()方法);
可能为空,表示原因不存在或未知。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.