检索现有数据连接或创建与指定的提供程序GUID和连接字符串的新数据连接。此外,选择性地更新返回的连接的连接字符串。
命名空间: Microsoft.VisualStudio.Data.Services
程序集: Microsoft.VisualStudio.Data.Services(在 Microsoft.VisualStudio.Data.Services.dll 中)
语法
声明
Function GetConnection ( _
provider As Guid, _
connectionString As String, _
encryptedString As Boolean, _
update As Boolean _
) As IVsDataConnection
IVsDataConnection GetConnection(
Guid provider,
string connectionString,
bool encryptedString,
bool update
)
IVsDataConnection^ GetConnection(
Guid provider,
String^ connectionString,
bool encryptedString,
bool update
)
abstract GetConnection :
provider:Guid *
connectionString:string *
encryptedString:bool *
update:bool -> IVsDataConnection
function GetConnection(
provider : Guid,
connectionString : String,
encryptedString : boolean,
update : boolean
) : IVsDataConnection
参数
- provider
类型:System.Guid
DDEX提供程序的GUID。
- connectionString
类型:System.String
连接字符串以未加密或加密形式。
- encryptedString
类型:System.Boolean
指示连接字符串是否的 Boolean 值加密(true)或未加密(false)。
- update
类型:System.Boolean
指示是否的 Boolean 值应更新数据连接的连接字符串值与指定的连接字符串(true) (false)。
返回值
类型:Microsoft.VisualStudio.Data.Services.IVsDataConnection
表示数据连接的 IVsDataConnection 对象。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。