ScopeExists 方法 (String, SqlConnection)
注意:此 API 已經過時。
傳回指定的範圍是否存在。
命名空間: Microsoft.Synchronization.Data.SqlServer
組件: Microsoft.Synchronization.Data.SqlServer (在 Microsoft.Synchronization.Data.SqlServer.dll 中)
語法
'宣告
<ObsoleteAttribute("Use Constructor with SqlConnection and ScopeExists(string scopeName)")> _
Public Function ScopeExists ( _
scopeName As String, _
connection As SqlConnection _
) As Boolean
'用途
Dim instance As SqlSyncScopeProvisioning
Dim scopeName As String
Dim connection As SqlConnection
Dim returnValue As Boolean
returnValue = instance.ScopeExists(scopeName, _
connection)
[ObsoleteAttribute("Use Constructor with SqlConnection and ScopeExists(string scopeName)")]
public bool ScopeExists(
string scopeName,
SqlConnection connection
)
[ObsoleteAttribute(L"Use Constructor with SqlConnection and ScopeExists(string scopeName)")]
public:
bool ScopeExists(
String^ scopeName,
SqlConnection^ connection
)
[<ObsoleteAttribute("Use Constructor with SqlConnection and ScopeExists(string scopeName)")>]
member ScopeExists :
scopeName:string *
connection:SqlConnection -> bool
public function ScopeExists(
scopeName : String,
connection : SqlConnection
) : boolean
參數
- scopeName
型別:System. . :: . .String
要檢查的範圍名稱。
- connection
型別:System.Data.SqlClient. . :: . .SqlConnection
與資料庫的連接。
傳回值
例外
例外狀況 | 條件 |
---|---|
ArgumentException | scopeName 是 null Nothing nullptr unit null 參考 (在 Visual Basic 中為 Nothing) 或空的。 |
ArgumentNullException | connection 是 null Nothing nullptr unit null 參考 (在 Visual Basic 中為 Nothing) 。 |