DacPackage.Load Method

Definition

Overloads

Load(Stream)

Load a package from the specified Stream.

Load(String)

Load a package file specified by fileName.

Load(Stream, DacSchemaModelStorageType)

Load a package from the specified Stream.

Load(String, DacSchemaModelStorageType)

Load a package file specified by fileName.

Load(Stream, DacSchemaModelStorageType, FileAccess)

Load a package from the specified Stream.

Load(String, DacSchemaModelStorageType, FileAccess)

Load a package file specified by fileName.

Load(Stream)

Load a package from the specified Stream.

C#
public static Microsoft.SqlServer.Dac.DacPackage Load(System.IO.Stream stream);

Parameters

stream
Stream

Stream from which to read the package.

Returns

DacPackage instance that represents the package loaded from the specified Stream.

Exceptions

If there is a problem reading the package; or if the package contains exported data.

Applies to

Microsoft.SQLServer.DacFx 162.2.111 et autres versions
Produit Versions
Microsoft.SQLServer.DacFx 140.3881.1, 150.18208.0, 160.2004021.0, 161.6374.0, 162.2.111

Load(String)

Load a package file specified by fileName.

C#
public static Microsoft.SqlServer.Dac.DacPackage Load(string fileName);

Parameters

fileName
String

Path to the package file.

Returns

DacPackage instance that represents the package loaded from the specified file.

Exceptions

If there is a problem reading the package; or if the package contains exported data.

Applies to

Microsoft.SQLServer.DacFx 162.2.111 et autres versions
Produit Versions
Microsoft.SQLServer.DacFx 140.3881.1, 150.18208.0, 160.2004021.0, 161.6374.0, 162.2.111

Load(Stream, DacSchemaModelStorageType)

Load a package from the specified Stream.

C#
public static Microsoft.SqlServer.Dac.DacPackage Load(System.IO.Stream stream, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType);

Parameters

stream
Stream

Stream from which to read the package.

modelStorageType
DacSchemaModelStorageType

Backing storage type for package instance.

Returns

DacPackage instance that represents the package loaded from the specified Stream.

Exceptions

If there is a problem reading the package; or if the package contains exported data.

Applies to

Microsoft.SQLServer.DacFx 162.2.111 et autres versions
Produit Versions
Microsoft.SQLServer.DacFx 140.3881.1, 150.18208.0, 160.2004021.0, 161.6374.0, 162.2.111

Load(String, DacSchemaModelStorageType)

Load a package file specified by fileName.

C#
public static Microsoft.SqlServer.Dac.DacPackage Load(string fileName, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType);

Parameters

fileName
String

Path to the package file.

modelStorageType
DacSchemaModelStorageType

Backing storage type for package instance.

Returns

DacPackage instance that represents the package loaded from the specified file.

Exceptions

If there is a problem reading the package; or if the package contains exported data.

Applies to

Microsoft.SQLServer.DacFx 162.2.111 et autres versions
Produit Versions
Microsoft.SQLServer.DacFx 140.3881.1, 150.18208.0, 160.2004021.0, 161.6374.0, 162.2.111

Load(Stream, DacSchemaModelStorageType, FileAccess)

Load a package from the specified Stream.

C#
public static Microsoft.SqlServer.Dac.DacPackage Load(System.IO.Stream stream, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType, System.IO.FileAccess packageAccess);

Parameters

stream
Stream

Stream from which to read the package.

modelStorageType
DacSchemaModelStorageType

Backing storage type for package instance.

packageAccess
FileAccess

The access in which to open the package. Valid values are Read or ReadWrite.

Returns

DacPackage instance that represents the package loaded from the specified Stream.

Exceptions

If there is a problem reading the package; or if the package contains exported data.

Applies to

Microsoft.SQLServer.DacFx 162.2.111 et autres versions
Produit Versions
Microsoft.SQLServer.DacFx 140.3881.1, 150.18208.0, 160.2004021.0, 161.6374.0, 162.2.111

Load(String, DacSchemaModelStorageType, FileAccess)

Load a package file specified by fileName.

C#
public static Microsoft.SqlServer.Dac.DacPackage Load(string fileName, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType, System.IO.FileAccess packageAccess);

Parameters

fileName
String

Path to the package file.

modelStorageType
DacSchemaModelStorageType

Backing storage type for package instance.

packageAccess
FileAccess

The access in which to open the package. Valid values are Read or ReadWrite.

Returns

DacPackage instance that represents the package loaded from the specified file.

Exceptions

If there is a problem reading the package; or if the package contains exported data.

Applies to

Microsoft.SQLServer.DacFx 162.2.111 et autres versions
Produit Versions
Microsoft.SQLServer.DacFx 140.3881.1, 150.18208.0, 160.2004021.0, 161.6374.0, 162.2.111