Construtor DacStore (SfcConnection)
Observação: essa API está obsoleta.
Inicializa uma nova instância da classe DacStore conectada com a instância especificada do Mecanismo de Banco de Dados.
Namespace: Microsoft.SqlServer.Management.Dac
Assembly: Microsoft.SqlServer.Management.Dac (em Microsoft.SqlServer.Management.Dac.dll)
Sintaxe
'Declaração
<ObsoleteAttribute> _
Public Sub New ( _
connection As SfcConnection _
)
'Uso
Dim connection As SfcConnection
Dim instance As New DacStore(connection)
[ObsoleteAttribute]
public DacStore(
SfcConnection connection
)
[ObsoleteAttribute]
public:
DacStore(
SfcConnection^ connection
)
[<ObsoleteAttribute>]
new :
connection:SfcConnection -> DacStore
public function DacStore(
connection : SfcConnection
)
Parâmetros
- connection
Tipo: Microsoft.SqlServer.Management.Sdk.Sfc. . :: . .SfcConnection
Um valor SfcConnection que especifica a conexão a uma instância do Mecanismo de Banco de Dados.
Comentários
The connection parameter is required when the application is running in connected mode. The SfcConnection class is a generic base class. Derived connection classes can be used such as SqlStoreConnection class.
Exemplos
VC#
ServerConnection serverConnection;
serverConnection = new ServerConnection("MYSERVER");
SqlStoreConnection sqlStoreConnection;
sqlStoreConnection = new SqlStoreConnection(serverConnection.SqlConnectionObject);
DacStore newDacStore;
newDacStore = new DacStore(sqlStoreConnection);
VB
Dim serverConnection As ServerConnection
serverConnection = New ServerConnection("MYSERVER")
Dim sqlStoreConnection As SqlStoreConnection
sqlStoreConnection = New SqlStoreConnection(serverConnection.SqlConnectionObject)
Dim newDacStore As DacStore
newDacStore = New DacStore(sqlStoreConnection)
PowerShell
$serverConnection = New-Object Microsoft.SqlServer.Management.Common.ServerConnection("MYSERVER")
$sqlStoreConnection = New-Object Microsoft.SqlServer.Management.Sdk.Sfc.SqlStoreConnection($serverConnection.SqlConnectionObject)
$newDacStore = New-Object Microsoft.SqlServer.Management.Dac.DacStore($sqlStoreConnection)
Consulte também