DatabaseDdlTrigger DatabaseDdlTrigger DatabaseDdlTrigger Constructors

Definition

Overloads

DatabaseDdlTrigger() DatabaseDdlTrigger() DatabaseDdlTrigger()

Initializes a new instance of the DatabaseDdlTrigger class.

DatabaseDdlTrigger(Database, String) DatabaseDdlTrigger(Database, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database and with the specified name.

DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database with the specified name. The trigger responds to the specified event set and runs the specified batch.

DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String, String, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String, String, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String, String, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database with the specified name. The trigger responds to the specified event set and runs the specified batch.

DatabaseDdlTrigger() DatabaseDdlTrigger() DatabaseDdlTrigger()

Initializes a new instance of the DatabaseDdlTrigger class.

public:
 DatabaseDdlTrigger();
public DatabaseDdlTrigger ();
Public Sub New ()

Examples

Calling Methods

Remarks

The default constructor initializes any fields to their default values.

DatabaseDdlTrigger(Database, String) DatabaseDdlTrigger(Database, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database and with the specified name.

public:
 DatabaseDdlTrigger(Microsoft::SqlServer::Management::Smo::Database ^ database, System::String ^ name);
public DatabaseDdlTrigger (Microsoft.SqlServer.Management.Smo.Database database, string name);
Parameters
database
Database Database Database

A Database object value that specifies the database on which the database DDL trigger is created.

name
String String String

A String value that specifies the name of the database DDL trigger.

Examples

Calling Methods

DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database with the specified name. The trigger responds to the specified event set and runs the specified batch.

public:
 DatabaseDdlTrigger(Microsoft::SqlServer::Management::Smo::Database ^ parent, System::String ^ name, Microsoft::SqlServer::Management::Smo::DatabaseDdlTriggerEventSet ^ events, System::String ^ textBody);
public DatabaseDdlTrigger (Microsoft.SqlServer.Management.Smo.Database parent, string name, Microsoft.SqlServer.Management.Smo.DatabaseDdlTriggerEventSet events, string textBody);
Public Sub New (parent As Database, name As String, events As DatabaseDdlTriggerEventSet, textBody As String)
Parameters
parent
Database Database Database

A Database object value that specifies the parent of the DatabaseDdlTrigger object.

name
String String String

A String value that specifies the name of the database data definition language (DDL) trigger.

events
DatabaseDdlTriggerEventSet DatabaseDdlTriggerEventSet DatabaseDdlTriggerEventSet

A DatabaseDdlTriggerEventSet object that specifies the DDL events to which the trigger responds.

textBody
String String String

A String value that specifies the Transact-SQL batch statement that runs when the trigger has been raised.

Examples

Calling Methods

DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String, String, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String, String, String) DatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String, String, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database with the specified name. The trigger responds to the specified event set and runs the specified batch.

public:
 DatabaseDdlTrigger(Microsoft::SqlServer::Management::Smo::Database ^ parent, System::String ^ name, Microsoft::SqlServer::Management::Smo::DatabaseDdlTriggerEventSet ^ events, System::String ^ assemblyName, System::String ^ className, System::String ^ method);
public DatabaseDdlTrigger (Microsoft.SqlServer.Management.Smo.Database parent, string name, Microsoft.SqlServer.Management.Smo.DatabaseDdlTriggerEventSet events, string assemblyName, string className, string method);
Public Sub New (parent As Database, name As String, events As DatabaseDdlTriggerEventSet, assemblyName As String, className As String, method As String)
Parameters
parent
Database Database Database

A Database object value that specifies the parent of the DatabaseDdlTrigger object.

name
String String String

A String value that specifies the name of the database data definition language (DDL) trigger.

events
DatabaseDdlTriggerEventSet DatabaseDdlTriggerEventSet DatabaseDdlTriggerEventSet

A DatabaseDdlTriggerEventSet object that specifies the DDL events to which the DDL trigger responds.

assemblyName
String String String

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
String String String

A String value that specifies the name of the class in the registered assembly.

method
String String String

A String value that specifies the method within the class that runs when the DDL trigger is raised.

Examples

Calling Methods

Applies to