ServerDdlTrigger Constructor (Server, String, ServerDdlTriggerEventSet, String, String, String)
Initializes a new instance of the ServerDdlTrigger class on the specified instance of Microsoft SQL Server and 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, _
assemblyName As String, _
className As String, _
method As String _
)
public ServerDdlTrigger (
Server parent,
string name,
ServerDdlTriggerEventSet events,
string assemblyName,
string className,
string method
)
public:
ServerDdlTrigger (
Server^ parent,
String^ name,
ServerDdlTriggerEventSet^ events,
String^ assemblyName,
String^ className,
String^ method
)
public ServerDdlTrigger (
Server parent,
String name,
ServerDdlTriggerEventSet events,
String assemblyName,
String className,
String method
)
public function ServerDdlTrigger (
parent : Server,
name : String,
events : ServerDdlTriggerEventSet,
assemblyName : String,
className : String,
method : 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 DDL trigger responds.
- assemblyName
A String value that specifies the name of the registered assembly that contains the user-defined function that runs when the DDL trigger is raised.
- className
A String value that specifies the name of the class in the registered assembly.
- method
A String value that specifies the method within the class that runs when the DDL trigger is 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)