Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ValidateDatabaseConnectionString method
Collapse the table of content
Expand the table of content

SPUtility.ValidateDatabaseConnectionString method

NOTE: This API is now obsolete.

Validates the connection string for the content database or the configuration database.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[ObsoleteAttribute("This method is not longer needed.", false)]
public static void ValidateDatabaseConnectionString(
	SPGlobalAdmin globalAdmin,
	string strDbServer,
	string strDbName,
	string strDbUser,
	string strDbPassword
)

Parameters

globalAdmin
Type: Microsoft.SharePoint.Administration.SPGlobalAdmin

A Microsoft.SharePoint.Administration.SPGlobalAdmin object.

strDbServer
Type: System.String

A string that contains the name of the database server.

strDbName
Type: System.String

A string that contains the name of the database.

strDbUser
Type: System.String

A string that contains the user name for the database account when SQL authentication is used. Pass null as the value for this parameter when Windows authentication is used.

strDbPassword
Type: System.String

A string that contains the database password when SQL authentication is used. Pass null as the value for this parameter when Microsoft Windows authentication is used.

The ValidateDatabaseConnectionString method returns a Microsoft.SharePoint.SPException exception if the specified server does not exist or access is denied, or the logon attempt fails because the specified database name does not exist.

Show:
© 2015 Microsoft