Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SqlExecutionException Class

SqlExecutionException Class

Defines a class for SQL execution exceptions in the System.Web.Management namespace.

Namespace:  System.Web.Management
Assembly:  System.Web (in System.Web.dll)

[SerializableAttribute]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SqlExecutionException : SystemException

This class is provided as a means to differentiate SQL execution exceptions from other application exceptions.

The following code example shows how to use the SqlExecutionException exception type. This code example is part of a larger example provided for the SqlServices class.

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);

System.Object
  System.Exception
    System.SystemException
      System.Web.Management.SqlExecutionException

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft