SPDatabase.GenerateRandomName Method

Generates a random database name using the specified connection string as a starting point.

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

Syntax

'Declaration
Public Shared Sub GenerateRandomName ( _
    ByRef suggestedConnectionString As SqlConnectionStringBuilder _
)
'Usage
Dim suggestedConnectionString As SqlConnectionStringBuilderSPDatabase.GenerateRandomName(suggestedConnectionString)
public static void GenerateRandomName(
    ref SqlConnectionStringBuilder suggestedConnectionString
)

Parameters

Remarks

If the suggested name does not already exist, the suggestedConnectionString parameter is used for the database name; if the name is already being used, a GUID is appended to suggestedConnectionString to create the database name.

See Also

Reference

SPDatabase Class

SPDatabase Members

Microsoft.SharePoint.Administration Namespace