Application Constructor (Instance, String)
Initializes a new instance of the Application class with a parent Instance object and a name.
Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntaxe
'Déclaration
Public Sub New ( _
instance As Instance, _
name As String _
)
public Application (
Instance instance,
string name
)
public:
Application (
Instance^ instance,
String^ name
)
public Application (
Instance instance,
String name
)
public function Application (
instance : Instance,
name : String
)
Paramètres
- instance
The Notification ServicesInstance that hosts the application. This parameter sets the Parent property.
name
A String, between 1 and 64 characters in length, that specifies the name of the application. Each application in an instance must have a unique name.You cannot change the name. To rename an application, you must drop the application, define it with the new name, and then add it to the instance.
Notes
Texte mis à jour :5 décembre 2005
The Application constructor creates a new instance of the Application class, sets the Parent and name properties, and sets the following default property values:
Property |
Default value |
empty string |
|
empty string |
|
1440 quanta |
|
1000 |
|
true |
|
true |
|
true |
|
1000 |
|
1 minute |
|
false |
|
1 minute |
|
"dbo" |
|
30 quanta |
|
1000 |
|
7 days |
Exemple
The following example shows how to use this constructor. myInstance is a reference to a previously-instantiated Instance object. applicationName is a string variable that specifies the name of the application.
Application myApplication =
new Application(myInstance, applicationName);
Dim myApplication As Application = _
New Application(myInstance, applicationName)
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
Application Class
Application Members
Microsoft.SqlServer.Management.Nmo Namespace