Share via


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)

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