语言

BacPackage.Load 方法

定义

重载

名称 说明
Load(Stream)

从指定的 Stream包加载包。

Load(String)

加载由 fileName. 指定的包文件。

Load(Stream, DacSchemaModelStorageType)

从指定的 Stream包加载包。

Load(String, DacSchemaModelStorageType)

加载由 fileName. 指定的包文件。

Load(Stream)

从指定的 Stream包加载包。

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

参数

stream
Stream

从中读取包的流。

返回

DacPackage 表示从指定文件加载的包的实例。

例外

如果读取包时遇到问题;或者包不包含导出的数据。

适用于

Load(String)

加载由 fileName. 指定的包文件。

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

参数

fileName
String

包文件的路径。

返回

DacPackage 表示从指定文件加载的包的实例。

例外

如果读取包时遇到问题;或包是否包含导出的数据。

适用于

Load(Stream, DacSchemaModelStorageType)

从指定的 Stream包加载包。

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

参数

stream
Stream

从中读取包的流。

modelStorageType
DacSchemaModelStorageType

支持包实例的存储类型。

返回

DacPackage 表示从指定文件加载的包的实例。

例外

如果读取包时遇到问题;或者包不包含导出的数据。

适用于

Load(String, DacSchemaModelStorageType)

加载由 fileName. 指定的包文件。

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

参数

fileName
String

包文件的路径。

modelStorageType
DacSchemaModelStorageType

支持包实例的存储类型。

返回

DacPackage 表示从指定文件加载的包的实例。

例外

如果读取包时遇到问题;或者包不包含导出的数据。

适用于