SPDatabase.GenerateRandomName method
會使用指定的連線字串當做起點隨機的資料庫名稱。
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Sub GenerateRandomName ( _
ByRef suggestedConnectionString As SqlConnectionStringBuilder _
)
'用途
Dim suggestedConnectionString As SqlConnectionStringBuilderSPDatabase.GenerateRandomName(suggestedConnectionString)
public static void GenerateRandomName(
ref SqlConnectionStringBuilder suggestedConnectionString
)
參數
suggestedConnectionString
Type: System.Data.SqlClient.SqlConnectionStringBuilderSqlConnectionStringBuilder物件,其中包含連接字串。
備註
建議的名稱不存在,即使用suggestedConnectionString參數的資料庫名稱 ;如果已在使用名稱、 GUID 會附加至suggestedConnectionString建立的資料庫名稱。