ServerDdlTrigger Constructor (Server, String, ServerDdlTriggerEventSet, String)
Initializes a new instance of the ServerDdlTrigger class on the specified database with the specified name. The trigger responds to the specified event set and runs the specified batch.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub New ( _
parent As Server, _
name As String, _
events As ServerDdlTriggerEventSet, _
textBody As String _
)
public ServerDdlTrigger (
Server parent,
string name,
ServerDdlTriggerEventSet events,
string textBody
)
public:
ServerDdlTrigger (
Server^ parent,
String^ name,
ServerDdlTriggerEventSet^ events,
String^ textBody
)
public ServerDdlTrigger (
Server parent,
String name,
ServerDdlTriggerEventSet events,
String textBody
)
public function ServerDdlTrigger (
parent : Server,
name : String,
events : ServerDdlTriggerEventSet,
textBody : String
)
Parameters
- parent
A Server object value that specifies the parent of the ServerDdlTrigger object.
- name
A String value that specifies the name of the server data definition language (DDL) trigger.
- events
A ServerDdlTriggerEventSet object that specifies the DDL events to which the trigger responds.
- textBody
A String value that specifies the Transact-SQL batch statement that runs when the trigger has been raised.
Remarks
This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.
Example
How to: Create, Alter, and Remove a Trigger in Visual Basic .NET
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
ServerDdlTrigger Class
ServerDdlTrigger Members
Microsoft.SqlServer.Management.Smo Namespace
Other Resources
Creating, Altering, and Removing Triggers
DDL Triggers
CREATE TRIGGER (Transact-SQL)