JavaTM 2 Platform
Standard Ed. 6

java.sql
类 SQLFeatureNotSupportedException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 java.sql.SQLException
              继承者 java.sql.SQLNonTransientException
                  继承者 java.sql.SQLFeatureNotSupportedException
所有已实现的接口:
Serializable, Iterable<Throwable>

public class SQLFeatureNotSupportedException
extends SQLNonTransientException

当 SQLState 类值为“0A”(值为“零”A)时抛出的 SQLException 子类。此异常表示 JDBC 驱动程序不支持可选的 JDBC 特性。可选 JDBC 特性可分为以下类别:

从以下版本开始:
1.6
另请参见:
序列化表格

构造方法摘要
SQLFeatureNotSupportedException()
          构造一个 SQLFeatureNotSupportedException 对象。
SQLFeatureNotSupportedException(String reason)
          构造一个带有给定 reasonSQLFeatureNotSupportedException 对象。
SQLFeatureNotSupportedException(String reason, String SQLState)
          构造一个带有给定 reasonSQLStateSQLFeatureNotSupportedException 对象。
SQLFeatureNotSupportedException(String reason, String SQLState, int vendorCode)
          构造一个带有给定 reasonSQLStatevendorCodeSQLFeatureNotSupportedException 对象。
SQLFeatureNotSupportedException(String reason, String SQLState, int vendorCode, Throwable cause)
          构造一个带有给定 reasonSQLStatevendorCodecauseSQLFeatureNotSupportedException 对象。
SQLFeatureNotSupportedException(String reason, String SQLState, Throwable cause)
          构造一个带有给定 reasonSQLStatecauseSQLFeatureNotSupportedException 对象。
SQLFeatureNotSupportedException(String reason, Throwable cause)
          构造一个带有给定 reasoncauseSQLFeatureNotSupportedException 对象。
SQLFeatureNotSupportedException(Throwable cause)
          构造一个带有给定 causeSQLFeatureNotSupportedException 对象。
 
方法摘要
 
从类 java.sql.SQLException 继承的方法
getErrorCode, getNextException, getSQLState, iterator, setNextException
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

SQLFeatureNotSupportedException

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

从以下版本开始:
1.6

SQLFeatureNotSupportedException

public SQLFeatureNotSupportedException(String reason)
构造一个带有给定 reasonSQLFeatureNotSupportedException 对象。SQLState 初始化为 null,供应商代码初始化为 0。 cause 没有初始化,随后可以调用 Throwable.initCause(java.lang.Throwable) 方法初始化。

参数:
reason - 对异常的描述
从以下版本开始:
1.6

SQLFeatureNotSupportedException

public SQLFeatureNotSupportedException(String reason,
                                       String SQLState)
构造一个带有给定 reasonSQLStateSQLFeatureNotSupportedException 对象。 cause 没有初始化,随后可以调用 Throwable.initCause(java.lang.Throwable) 方法初始化。供应商代码初始化为 0。

参数:
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
从以下版本开始:
1.6

SQLFeatureNotSupportedException

public SQLFeatureNotSupportedException(String reason,
                                       String SQLState,
                                       int vendorCode)
构造一个带有给定 reasonSQLStatevendorCodeSQLFeatureNotSupportedException 对象。 cause 没有初始化,随后可以调用 Throwable.initCause(java.lang.Throwable) 方法初始化。

参数:
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
vendorCode - 特定于数据库供应商的异常代码
从以下版本开始:
1.6

SQLFeatureNotSupportedException

public SQLFeatureNotSupportedException(Throwable cause)
构造一个带有给定 causeSQLFeatureNotSupportedException 对象。SQLState 初始化为 null,供应商代码初始化为 0。如果 cause==null,那么 reason 初始化为 null;如果 cause!=null,则初始化为 cause.toString()

参数:
cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示原因不存在或未知。
从以下版本开始:
1.6

SQLFeatureNotSupportedException

public SQLFeatureNotSupportedException(String reason,
                                       Throwable cause)
构造一个带有给定 reasoncauseSQLFeatureNotSupportedException 对象。SQLState 初始化为 null,供应商代码初始化为 0。

参数:
reason - 对异常的描述。
cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
从以下版本开始:
1.6

SQLFeatureNotSupportedException

public SQLFeatureNotSupportedException(String reason,
                                       String SQLState,
                                       Throwable cause)
构造一个带有给定 reasonSQLStatecauseSQLFeatureNotSupportedException 对象。供应商代码初始化为 0。

参数:
reason - 对异常的描述。
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
cause - 原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
从以下版本开始:
1.6

SQLFeatureNotSupportedException

public SQLFeatureNotSupportedException(String reason,
                                       String SQLState,
                                       int vendorCode,
                                       Throwable cause)
构造一个带有给定 reasonSQLStatevendorCodecauseSQLFeatureNotSupportedException 对象。

参数:
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
vendorCode - 特定于数据库供应商的异常代码
cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示原因不存在或未知。
从以下版本开始:
1.6

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java 2 SDK SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策