共用方式為


Validate 方法

Validates the package with the specified connection and determines whether the specified server is valid.

命名空間:  Microsoft.SqlServer.Management.Dac
組件:  Microsoft.SqlServer.Management.Dac (在 Microsoft.SqlServer.Management.Dac.dll 中)

語法

'宣告
Public Shared Function Validate ( _
    server As Server, _
    databaseName As String _
) As ExtractValidationException
'用途
Dim server As Server
Dim databaseName As String
Dim returnValue As ExtractValidationException

returnValue = DatabaseExtractValidator.Validate(server, _
    databaseName)
public static ExtractValidationException Validate(
    Server server,
    string databaseName
)
public:
static ExtractValidationException^ Validate(
    Server^ server, 
    String^ databaseName
)
static member Validate : 
        server:Server * 
        databaseName:string -> ExtractValidationException 
public static function Validate(
    server : Server, 
    databaseName : String
) : ExtractValidationException

參數

傳回值

型別:Microsoft.SqlServer.Management.Dac. . :: . .ExtractValidationException
A ExtractValidationException that specifies which problems were detected. Returns nullNothingnullptrunitnull 參考 (在 Visual Basic 中為 Nothing) if no problems were detected.

備註

The Validate method checks to ensure that:

  • The server is not in Design Mode.

  • The database exists, and that information can be extracted from it.

  • The user has sufficient privileges to extract information from the database.