Share via


SPDatabaseParameters.CreateParameters Method (String, String, String, String, String, SPDatabaseParameterOptions)

Creates a new database parameters object by using the specified parameters.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Shared Function CreateParameters ( _
    initialCatalog As String, _
    dataSource As String, _
    username As String, _
    password As String, _
    failoverPartner As String, _
    options As SPDatabaseParameterOptions _
) As SPDatabaseParameters
'Usage
Dim initialCatalog As String
Dim dataSource As String
Dim username As String
Dim password As String
Dim failoverPartner As String
Dim options As SPDatabaseParameterOptions
Dim returnValue As SPDatabaseParameters

returnValue = SPDatabaseParameters.CreateParameters(initialCatalog, _
    dataSource, username, password, failoverPartner, _
    options)
public static SPDatabaseParameters CreateParameters(
    string initialCatalog,
    string dataSource,
    string username,
    string password,
    string failoverPartner,
    SPDatabaseParameterOptions options
)

Parameters

  • initialCatalog
    Type: System.String

    The catalog or database name to use for the database connection.

  • dataSource
    Type: System.String

    The data source or database server to use for the database connection.

  • username
    Type: System.String

    The user name to be used for the database connection.

  • password
    Type: System.String

    The password to be used for the database connection.

  • failoverPartner
    Type: System.String

    The name of the failover server to use for the database connection.

Return Value

Type: Microsoft.SharePoint.Administration.SPDatabaseParameters
The new database parameters object.

See Also

Reference

SPDatabaseParameters Class

SPDatabaseParameters Members

CreateParameters Overload

Microsoft.SharePoint.Administration Namespace