SqlSyncScopeProvisioning.ScopeExists Method (String, SqlConnection)
Note: This API is now obsolete.
Returns whether the specified scope exists.
Namespace: Microsoft.Synchronization.Data.SqlServer
Assembly: Microsoft.Synchronization.Data.SqlServer (in Microsoft.Synchronization.Data.SqlServer.dll)
Syntax
'Declaration
<ObsoleteAttribute("Use Constructor with SqlConnection and ScopeExists(string scopeName)")> _
Public Function ScopeExists ( _
scopeName As String, _
connection As SqlConnection _
) As Boolean
'Usage
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
Parameters
- scopeName
Type: System.String
The name of the scope to check.
- connection
Type: System.Data.SqlClient.SqlConnection
A connection to the database.
Return Value
Type: System.Boolean
Exceptions
Exception | Condition |
---|---|
ArgumentException | scopeName is null reference (Nothing in Visual Basic) or empty. |
ArgumentNullException | connection is null reference (Nothing in Visual Basic). |