DatabaseProvider..::.ConnectionStringArguments Property Home
.NET Framework Class Library
DatabaseProvider..::.ConnectionStringArguments Property

Gets a collection that contains the collection of database connection arguments.

Namespace:  Microsoft.Web.Management.DatabaseManager
Assembly:  Microsoft.Web.Management.DatabaseManager (in Microsoft.Web.Management.DatabaseManager.dll)
Syntax

'Usage

Dim instance As DatabaseProvider
Dim value As ICollection(Of ConnectionArgument)

value = instance.ConnectionStringArguments


'Declaration

Public MustOverride ReadOnly Property ConnectionStringArguments As ICollection(Of ConnectionArgument)
    Get

Property Value

Type: System.Collections.Generic..::.ICollection<(Of <(ConnectionArgument>)>)
A read-only ICollection object that contains a ConnectionArgument collection.
Remarks

Your provider must implement the ConnectionStringArguments property in order to define the connection string arguments that your database provider requires.

Examples

The following code sample illustrates an example ConnectionStringArguments 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



Permissions

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
See Also

Reference

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View