ConnectionArgument.Name Property
Gets or sets a value that specifies the name of the connection argument.
Namespace: Microsoft.Web.Management.DatabaseManager
Assembly: Microsoft.Web.Management.DatabaseManager (in Microsoft.Web.Management.DatabaseManager.dll)
Syntax
'Declaration
Public Property Name As String
'Usage
Dim instance As ConnectionArgument
Dim value As String
value = instance.Name
instance.Name = value
public string Name { get; set; }
public:
property String^ Name {
String^ get ();
void set (String^ value);
}
function get Name () : String
function set Name (value : String)
Property Value
Type: System.String
The name of the connection argument.
Examples
The following code sample illustrates an example ConnectionStringArgument property that returns the connection string arguments for a Microsoft Access database provider.
Public Overrides ReadOnly Property ConnectionStringArguments() _
As System.Collections.Generic.ICollection( _
Of Microsoft.Web.Management.DatabaseManager.ConnectionArgument)
Get
Dim argList As LinkedList(Of ConnectionArgument) = New LinkedList(Of ConnectionArgument)
Dim provider As ConnectionArgument = New ConnectionArgument
provider.Name = "Provider"
provider.DefaultValue = "Microsoft.Jet.OLEDB.4.0"
argList.AddLast(provider)
Dim database As ConnectionArgument = New ConnectionArgument
database.Name = "Data Source"
database.DefaultValue = "*.mdb"
database.IsRequired = True
argList.AddLast(database)
Dim password As ConnectionArgument = New ConnectionArgument
password.Name = "Jet OLEDB:Database Password"
password.DefaultValue = ""
password.IsRequired = False
password.IsPassword = True
argList.AddLast(password)
Return argList
End Get
End Property
public override ICollection<ConnectionArgument> ConnectionStringArguments
{
get
{
LinkedList<ConnectionArgument> argList = new LinkedList<ConnectionArgument>();
ConnectionArgument provider = new ConnectionArgument();
provider.Name = "Provider";
provider.DefaultValue = "Microsoft.Jet.OLEDB.4.0";
argList.AddLast(provider);
ConnectionArgument database = new ConnectionArgument();
database.Name = "Data Source";
database.DefaultValue = "*.mdb";
database.IsRequired = true;
argList.AddLast(database);
ConnectionArgument password = new ConnectionArgument();
password.Name = "Jet OLEDB:Database Password";
password.DefaultValue = "";
password.IsRequired = false;
password.IsPassword = true;
argList.AddLast(password);
return argList;
}
}
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.