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