SqlExecutionExceptionとは? わかりやすく解説

SqlExecutionException クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

SQL 実行例外のクラスを System.Web.Management 名前空間に定義します。

名前空間: System.Web.Management
アセンブリ: System.Web (system.web.dll 内)
構文構文

<SerializableAttribute> _
Public NotInheritable Class
 SqlExecutionException
    Inherits SystemException
Dim instance As SqlExecutionException
[SerializableAttribute] 
public sealed class SqlExecutionException :
 SystemException
[SerializableAttribute] 
public ref class SqlExecutionException sealed
 : public SystemException
/** @attribute SerializableAttribute() */ 
public final class SqlExecutionException extends
 SystemException
SerializableAttribute 
public final class SqlExecutionException extends
 SystemException
解説解説
使用例使用例

SqlExecutionException 例外型を使用する方法を次のコード例に示します。このコード例は、SqlServices クラスのトピックで取り上げているコード例の一部分です。

Console.WriteLine( _
    "An SQL execution exception occurred.")
Console.WriteLine()
Console.WriteLine("  Message: {0}", _
    sqlExecutionException.Message)
Console.WriteLine("  Server: {0}", _
    sqlExecutionException.Server)
Console.WriteLine("  Database: {0}", _
    sqlExecutionException.Database)
Console.WriteLine("  Commands: {0}", _
    sqlExecutionException.Commands)
Console.WriteLine("  SqlFile: {0}", _
    sqlExecutionException.SqlFile)
Console.WriteLine("  Inner Exception: {0}", _
    sqlExecutionException.Exception)
Console.WriteLine(
    "An SQL execution exception occurred.");
Console.WriteLine();
Console.WriteLine("  Message: {0}",
    sqlExecutionException.Message);
Console.WriteLine("  Server: {0}",
    sqlExecutionException.Server);
Console.WriteLine("  Database: {0}",
    sqlExecutionException.Database);
Console.WriteLine("  Commands: {0}",
    sqlExecutionException.Commands);
Console.WriteLine("  SqlFile: {0}",
    sqlExecutionException.SqlFile);
Console.WriteLine("  Inner Exception: {0}",
    sqlExecutionException.Exception);
.NET Framework のセキュリティ.NET Framework のセキュリティ
継承階層継承階層
System.Object
   System.Exception
     System.SystemException
      System.Web.Management.SqlExecutionException
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlExecutionException メンバ
System.Web.Management 名前空間
SqlServices
SystemException
SqlException

SqlExecutionException コンストラクタ ()


SqlExecutionException コンストラクタ (String, Exception)

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

渡されたメッセージおよび例外を使用して SqlExecutionException クラスの新しいインスタンスを初期化します。

名前空間: System.Web.Management
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    message As String, _
    innerException As Exception _
)
Dim message As String
Dim innerException As Exception

Dim instance As New SqlExecutionException(message,
 innerException)
public SqlExecutionException (
    string message,
    Exception innerException
)
public:
SqlExecutionException (
    String^ message, 
    Exception^ innerException
)
public SqlExecutionException (
    String message, 
    Exception innerException
)
public function SqlExecutionException (
    message : String, 
    innerException : Exception
)

パラメータ

message

例外の原因を説明するエラー メッセージ。

innerException

発生した Exception。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlExecutionException クラス
SqlExecutionException メンバ
System.Web.Management 名前空間

SqlExecutionException コンストラクタ (String, String, String, String, String, SqlException)

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

SqlExecutionException クラスの新しいインスタンスを初期化します。

名前空間: System.Web.Management
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    message As String, _
    server As String, _
    database As String, _
    sqlFile As String, _
    commands As String, _
    sqlException As SqlException _
)
Dim message As String
Dim server As String
Dim database As String
Dim sqlFile As String
Dim commands As String
Dim sqlException As SqlException

Dim instance As New SqlExecutionException(message,
 server, database, sqlFile, commands, sqlException)
public SqlExecutionException (
    string message,
    string server,
    string database,
    string sqlFile,
    string commands,
    SqlException sqlException
)
public:
SqlExecutionException (
    String^ message, 
    String^ server, 
    String^ database, 
    String^ sqlFile, 
    String^ commands, 
    SqlException^ sqlException
)
public SqlExecutionException (
    String message, 
    String server, 
    String database, 
    String sqlFile, 
    String commands, 
    SqlException sqlException
)
public function SqlExecutionException (
    message : String, 
    server : String, 
    database : String, 
    sqlFile : String, 
    commands : String, 
    sqlException : SqlException
)

パラメータ

message

例外の原因を説明するエラー メッセージ。

server

SQL コマンドを実行する対象の SQL Server インスタンス。

database

SQL コマンドを実行する対象のデータベース。

sqlFile

実行されている SQL コマンドが記録されているインストール ファイルの名前。

commands

例外の発生時に実行されていた SQL コマンド。

sqlException

SQL コマンドの処理中に発生した SqlException。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlExecutionException クラス
SqlExecutionException メンバ
System.Web.Management 名前空間
SqlException

SqlExecutionException コンストラクタ

SqlExecutionException クラスの新しいインスタンスを初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
SqlExecutionException () 既定値を使用して SqlExecutionException クラスの新しいインスタンスを初期化します。
SqlExecutionException (String) 渡されたメッセージを使用して、SqlExecutionException クラスの新しいインスタンスを初期化します。
SqlExecutionException (String, Exception) 渡されたメッセージおよび例外を使用して SqlExecutionException クラスの新しいインスタンスを初期化します。
SqlExecutionException (String, String, String, String, String, SqlException) SqlExecutionException クラスの新しいインスタンスを初期化します。
参照参照

関連項目

SqlExecutionException クラス
SqlExecutionException メンバ
System.Web.Management 名前空間

SqlExecutionException コンストラクタ (String)


SqlExecutionException プロパティ


パブリック プロパティパブリック プロパティ

( プロテクト プロパティ も参照)
  名前 説明
パブリック プロパティ Commands 例外の発生時に実行されていた SQL コマンドを取得します。
パブリック プロパティ Data  例外に関する追加のユーザー定義情報を提供するキー/値ペアのコレクションを取得します。 ( Exception から継承されます。)
パブリック プロパティ Database 例外の発生時にアクセスされていたデータベースの名前を取得します。
パブリック プロパティ Exception SQL コマンドの処理中に発生した例外を取得します。
パブリック プロパティ HelpLink  例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。 ( Exception から継承されます。)
パブリック プロパティ InnerException  現在の例外を発生させた Exception インスタンスを取得します。 ( Exception から継承されます。)
パブリック プロパティ Message  現在の例外を説明するメッセージを取得します。 ( Exception から継承されます。)
パブリック プロパティ Server 例外の発生時にアクセスされていた SQL Server インスタンスを取得します。
パブリック プロパティ Source  エラーの原因となったアプリケーションまたはオブジェクトの名前を取得または設定します。 ( Exception から継承されます。)
パブリック プロパティ SqlFile 例外の発生時に実行されていた SQL コマンドが記録されているファイルの名前およびパスを取得します。
パブリック プロパティ StackTrace  現在の例外がスローされたときにコール スタックにあったフレームの文字列形式を取得します。 ( Exception から継承されます。)
パブリック プロパティ TargetSite  現在の例外をスローするメソッドを取得します。 ( Exception から継承されます。)
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ HResult  特定の例外に割り当てられているコード化数値である HRESULT を取得または設定します。 ( Exception から継承されます。)
参照参照

関連項目

SqlExecutionException クラス
System.Web.Management 名前空間
SqlServices
SystemException
SqlException

SqlExecutionException メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SqlExecutionException クラス
System.Web.Management 名前空間
SqlServices
SystemException
SqlException

SqlExecutionException メンバ

SQL 実行例外のクラスを System.Web.Management 名前空間に定義します。

SqlExecutionException データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SqlExecutionException オーバーロードされます。 SqlExecutionException クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ も参照)
  名前 説明
パブリック プロパティ Commands 例外の発生時に実行されていた SQL コマンドを取得します。
パブリック プロパティ Data  例外に関する追加のユーザー定義情報を提供するキー/値ペアのコレクションを取得します。(Exception から継承されます。)
パブリック プロパティ Database 例外の発生時にアクセスされていたデータベースの名前を取得します。
パブリック プロパティ Exception SQL コマンドの処理中に発生した例外を取得します。
パブリック プロパティ HelpLink  例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。(Exception から継承されます。)
パブリック プロパティ InnerException  現在の例外を発生させた Exception インスタンスを取得します。(Exception から継承されます。)
パブリック プロパティ Message  現在の例外を説明するメッセージを取得します。(Exception から継承されます。)
パブリック プロパティ Server 例外の発生時にアクセスされていた SQL Server インスタンスを取得します。
パブリック プロパティ Source  エラーの原因となったアプリケーションまたはオブジェクトの名前を取得または設定します。(Exception から継承されます。)
パブリック プロパティ SqlFile 例外の発生時に実行されていた SQL コマンドが記録されているファイルの名前およびパスを取得します。
パブリック プロパティ StackTrace  現在の例外がスローされたときにコール スタックにあったフレームの文字列形式を取得します。(Exception から継承されます。)
パブリック プロパティ TargetSite  現在の例外をスローするメソッドを取得します。(Exception から継承されます。)
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ HResult  特定の例外に割り当てられているコード化数値である HRESULT を取得または設定します。(Exception から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SqlExecutionException クラス
System.Web.Management 名前空間
SqlServices
SystemException
SqlException



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「SqlExecutionException」の関連用語

SqlExecutionExceptionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlExecutionExceptionのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS