DatabaseProvider.ConnectionStringArguments Property
IIS 7.0
Gets a collection that contains the collection of database connection arguments.
Assembly: Microsoft.Web.Management.DatabaseManager (in Microsoft.Web.Management.DatabaseManager.dll)
public abstract ICollection<ConnectionArgument> ConnectionStringArguments { get; }
Property Value
Type: System.Collections.Generic.ICollection<ConnectionArgument>A read-only ICollection object that contains a ConnectionArgument collection.
The following code sample illustrates an example ConnectionStringArguments property that returns the connection string arguments for a Microsoft Access database provider.
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;
}
}
- 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.