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) 。 |