|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object java.lang.Throwable java.lang.Exception java.sql.SQLException
public class SQLException
データベースアクセスエラーまたはその他のエラーに関する情報を提供する例外です。
各 SQLException
は次のような情報を提供します。
getMesage
メソッドにより使用できる
DatabaseMetaData
メソッド getSQLStateType
により、ドライバが XOPEN の型と SQL 99 の型のどちらを返すかを確認できる
コンストラクタの概要 | |
---|---|
SQLException()
SQLException オブジェクトを構築します。 |
|
SQLException(String reason)
指定された reason で SQLException オブジェクトを構築します。 |
|
SQLException(String reason,
String SQLState)
指定された reason と SQLState で SQLException オブジェクトを構築します。 |
|
SQLException(String reason,
String SQLState,
int vendorCode)
完全指定の SQLException オブジェクトを構築します。 |
メソッドの概要 | |
---|---|
int |
getErrorCode()
この SQLException オブジェクトのベンダー固有の例外コードを取得します。 |
SQLException |
getNextException()
この SQLException オブジェクトにチェーンされた例外を取得します。 |
String |
getSQLState()
この SQLException オブジェクトの SQLState を取得します。 |
void |
setNextException(SQLException ex)
チェーンの最後に SQLException オブジェクトを追加します。 |
クラス 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 |
コンストラクタの詳細 |
---|
public SQLException(String reason, String SQLState, int vendorCode)
SQLException
オブジェクトを構築します。
reason
- 例外の説明SQLState
- 例外を識別する XOPEN コードまたは SQL 99 コードvendorCode
- データベースベンダー固有の例外コードpublic SQLException(String reason, String SQLState)
SQLException
オブジェクトを構築します。vendorCode
フィールドのデフォルトは 0 に設定されます。
reason
- 例外の説明SQLState
- 例外を識別する XOPEN コードまたは SQL 99 コードpublic SQLException(String reason)
SQLException
オブジェクトを構築します。SQLState
フィールドのデフォルトは null
、vendorCode
フィールドのデフォルトは 0 にそれぞれ設定されます。
reason
- 例外の説明public SQLException()
SQLException
オブジェクトを構築します。reason
フィールドのデフォルトは null、SQLState
フィールドのデフォルトは null
、vendorCode
フィールドのデフォルトは 0 にそれぞれ設定されます。
メソッドの詳細 |
---|
public String getSQLState()
SQLException
オブジェクトの SQLState を取得します。
public int getErrorCode()
SQLException
オブジェクトのベンダー固有の例外コードを取得します。
public SQLException getNextException()
SQLException
オブジェクトにチェーンされた例外を取得します。
SQLException
オブジェクト。ない場合は null
setNextException(java.sql.SQLException)
public void setNextException(SQLException ex)
SQLException
オブジェクトを追加します。
ex
- SQLException
チェーンの最後に追加される新しい例外getNextException()
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。