Share via


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.

public static Microsoft.SqlServer.Dac.DacPackage Load (System.IO.Stream stream);
static member Load : System.IO.Stream -> Microsoft.SqlServer.Dac.DacPackage
Public Shared Function Load (stream As Stream) As DacPackage

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

Load(String)

Load a package file specified by fileName.

public static Microsoft.SqlServer.Dac.DacPackage Load (string fileName);
static member Load : string -> Microsoft.SqlServer.Dac.DacPackage
Public Shared Function Load (fileName As String) As DacPackage

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

Load(Stream, DacSchemaModelStorageType)

Load a package from the specified Stream.

public static Microsoft.SqlServer.Dac.DacPackage Load (System.IO.Stream stream, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType);
static member Load : System.IO.Stream * Microsoft.SqlServer.Dac.DacSchemaModelStorageType -> Microsoft.SqlServer.Dac.DacPackage
Public Shared Function Load (stream As Stream, modelStorageType As DacSchemaModelStorageType) As DacPackage

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

Load(String, DacSchemaModelStorageType)

Load a package file specified by fileName.

public static Microsoft.SqlServer.Dac.DacPackage Load (string fileName, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType);
static member Load : string * Microsoft.SqlServer.Dac.DacSchemaModelStorageType -> Microsoft.SqlServer.Dac.DacPackage
Public Shared Function Load (fileName As String, modelStorageType As DacSchemaModelStorageType) As DacPackage

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

Load(Stream, DacSchemaModelStorageType, FileAccess)

Load a package from the specified Stream.

public static Microsoft.SqlServer.Dac.DacPackage Load (System.IO.Stream stream, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType, System.IO.FileAccess packageAccess);
static member Load : System.IO.Stream * Microsoft.SqlServer.Dac.DacSchemaModelStorageType * System.IO.FileAccess -> Microsoft.SqlServer.Dac.DacPackage
Public Shared Function Load (stream As Stream, modelStorageType As DacSchemaModelStorageType, packageAccess As FileAccess) As DacPackage

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

Load(String, DacSchemaModelStorageType, FileAccess)

Load a package file specified by fileName.

public static Microsoft.SqlServer.Dac.DacPackage Load (string fileName, Microsoft.SqlServer.Dac.DacSchemaModelStorageType modelStorageType, System.IO.FileAccess packageAccess);
static member Load : string * Microsoft.SqlServer.Dac.DacSchemaModelStorageType * System.IO.FileAccess -> Microsoft.SqlServer.Dac.DacPackage
Public Shared Function Load (fileName As String, modelStorageType As DacSchemaModelStorageType, packageAccess As FileAccess) As DacPackage

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