IVsDataConnectionManager.GetConnection 方法 (Guid, String, Boolean, Boolean)
擷取現有資料連接或建立符合所指定的提供者 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
類型:GuidDDEX 提供者的 GUID。
connectionString
類型:String連接字串以未加密的加密格式。
encryptedString
類型:Boolean表示連接字串是否 Boolean 值加密 (true) 或未加密 (false)。
update
類型:Boolean指出是否 Boolean 值應該更新資料連接的連接字串值和所指定的連接字串 (true) (false)。
傳回值
類型:Microsoft.VisualStudio.Data.Services.IVsDataConnection
表示資料連接的 IVsDataConnection 物件。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。