CapturedSql Class

The CapturedSql class represents the Transact-SQL commands that are sent to the instance of SQL Server by way of the referenced connection. However, they are then redirected to a buffer instead of running immediately on the instance of SQL Server.

System.Object
  Microsoft.SqlServer.Management.Common.CapturedSql

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

public sealed class CapturedSql

The CapturedSql type exposes the following members.

  NameDescription
Public propertyTextGets the captured Transact-SQL commands in the buffer.
Top

  NameDescription
Public methodAddAdds a Transact-SQL statement to the captured Transact-SQL commands in the buffer.
Public methodClearClears the buffer that contains the captured Transact-SQL commands.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

The capturedSql object is served by the connectionmanager object.

Thread Safety

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

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

Community Additions

ADD
Show: